archive-org.com » ORG » R » REPOZE.ORG

Total: 111

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Repoze Blog :)
    author request params author newpost subject request params subject I didn t set ID because it will get an autoincrement value Attach the object to the session model Session save newpost Commit the transaction This sends the SQL INSERT command due to autoflushing model Session commit redirect to blog Using the transaction Framework in the Application I decided to knock together a simple data manager for this application following Chris Transactions in WSGI tutorial The class implements the IDataManager API using the ORM session to do the real work class DataManager object transaction manager None def init self post self post post def commit self transaction See IDataManager model Session save self post def abort self transaction See IDataManager model Session rollback def tpc begin self transaction See IDataManager def tpc vote self transaction See IDataManager def tpc finish self transaction See IDataManager model Session commit def tpc abort self transaction See IDataManager model Session rollback def sortKey self See IDataManager return myblog sql I then modified the controller method such that it registers an instance of the DataManager class with the transaction Note the addition of pseudo validation logic which triggers an exception in order to demonstrate the auto rollback feature of repoze tm import transaction def blog add process self Create a new Blog object and populate it newpost model Blog newpost date datetime datetime now newpost content request params content newpost author request params author newpost subject request params subject Register with the global two phase transaction manager dm DataManager newpost transaction get join dm Trigger an error on invalid data to trigger the abort if newpost subject startswith Abort raise ValueError Invalid data redirect to blog Configuring the Application First I needed to install repoze tm and its dependencies bin easy install i http dist repoze

    Original URL path: http://blog.repoze.org/repoze.tm_with_pylons-20071218/ (2016-01-08)
    Open archived version from archive


  • Repoze Blog :)
    delays during the demos we did at UNc and CPCC In no particular order here are the ideas we came up with Python based Move the current profiling support out of Zope the application and make it middleware so we can measure the various bits more cleanly Chris says Ian Bicking has some support already but only for one request at a time When doing a fast restart signal first an event which allows listeners to dump any global state to a cache on the filesystem then on restarting arrange to signal another event which allows listeners to reload that state short circuiting the whole application initialization phase In development mode maybe we can trigger the fast restart whenever any of getattr x file None for x in sys modules values changes Can we somehow arrange for the triggering request to be retried after the restart Does it matter Hmm it looks like this is what paste reloadr does already Cool Score that NIH 0 Ian Rocks 1 Zope related Changes Maybe find a way to add all parsed ZCML files to the watched files list too so that changing ZCML will automagically restart the application Finish making ZCML parsing side effect free so that we can cache the action list to a pyc like file across application runs a pickle file Removing ZCML parse time side effects implies removing the eager validation resolution of dotted names Instead the parser would create deferreds representing the target objects which would then be resolved replaced at the point of use We would presumably be able to serialize the deferreds in the pickle file mentioned above One particularly interesting bit of global state is the set of pickles cached by each ZODB connection Repopulating those caches after a restart is one reason that

    Original URL path: http://blog.repoze.org/highway_jam/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    var pipeline main pipeline egg Paste cgitb demo Setting up the Trac Instance Before starting the server we need to initialize the Trac instance in the var directory bin trac admin var initenv Running Trac under Paste Now we can start the server bin paster serve etc paste ini And view the Trac homepage Adding Deliverance to the Mix First install Deliverance bin easy install Deliverance Then add a minimal rules file defining how Deliverance will merge the application into the theme cat etc minimal rules xml xml version 1 0 encoding UTF 8 rules xmlns http www plone org deliverance prepend theme head content head link nocontent ignore prepend theme head content head style nocontent ignore append theme head content head script nocontent ignore append theme head content head meta nocontent ignore copy theme table id portal columns content div id content rules And configure Deliverance into the pipeline using those rules cat etc paste ini filter deliverance paste filter app factory deliverance wsgimiddleware make filter theme uri http secoora org rule uri file here s minimal rules xml pipeline main pipeline egg Paste cgitb deliverance trac Making Trac s Nav Fit into the Theme As you can see the minimal site does not expose any of the standard Trac navigation links instead its navigation is thet from the theme a Plone site We modified the rules file to merge the Trac links into the theme along with the search form cat etc trac rules xml xml version 1 0 encoding UTF 8 rules xmlns http www plone org deliverance prepend theme head content head link nocontent ignore prepend theme head content head style nocontent ignore append theme head content head script nocontent ignore append theme head content head meta nocontent ignore drop theme ul id portal siteactions append

    Original URL path: http://blog.repoze.org/theming_trac_with_deliverance/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    the D C ZPUG group on December 4th Chris McDonough and Tres Seaver will be doing back to back presentations on Repoze to the Triangle ZPUG on December 4th and to the Charlotte Python Group on December 5th It looks as though we will be able to do some sprinting on the day of the 5th as well Chris and Tres have also been invited to present Repoze to the

    Original URL path: http://blog.repoze.org/december_usergroups/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    Deliverance wnd WSGI this evening Paul Everitt will be presenting a talk on to the D C Zope Python Users Group meeting at the TNC Boardroom at 7 00 PM Chris McDonough and Tres Seaver are presenting a talk Plumbing Zope through WSGI to the Triangle Zope Plone Users Group in Chapel Hill North Caroline meeting on the UNC campus Chapman 435 at 7 00 Tres and Chris will recap

    Original URL path: http://blog.repoze.org/dueling_banjos-20071204/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    0 2007 11 20 00 00 00 05 00 0 2 8 Release of repoze zope2 A new releases of repoze zope2 0 2 8 is available This release fixes some minor redirect bugs when adding content via Zope s

    Original URL path: http://blog.repoze.org/releases-20071120/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    00 00 05 00 Integrating Transactions into WSGI Applications Using repoze tm We ve created a tutorial about integrating transactions into WSGI applications using repoze tm repoze tm is a transaction manager implemented as WSGI middleware that uses the ZODB

    Original URL path: http://blog.repoze.org/tmdemo-20071107/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    created and released Developing With repoze zope2 which is a short 10 page PDF that explains the benefits of and differences between developing Zope 2 applications using Repoze and stock Zope 2 It might be helpful to folks developing under Plone and CMF If you have comments or questions about it please contact me or send a message to the mailing list Note also that I ll be introducing Repoze

    Original URL path: http://blog.repoze.org/devwrepoze-zope2-pdf/ (2016-01-08)
    Open archived version from archive



  •