Skip to content. | Skip to navigation

Personal tools
You are here: Home / Software and Systems / Software Development Craft / Zope/Plone / Plone/WSGI / WSGI Plone Paste Config

WSGI Plone Paste Config

by Ken Manheimer last modified Aug 03, 2011 06:39 PM
Filed under: , ,
Notes about the python Paste configuration for the devel build of Plone with WSGI using Martin Aspelli's Plone 3.x Uber-Buildout

here the python paste configuration for the devel build of the PloneWithWSGI plone built using Martin Aspelli's Plone3.x-repoze uber-buildout buildout. the Plone With WSGI understanding the deliverance/plone them composition section is concerned with that configuration.

here are some relevant general paste details distilled from the paste deploy documentation:

  • the sections of the file define applications for handling requests and filters, for use in the applications, to be applied to requests along the way.

  • the elements are generally specified as python application packages called eggs. (eggs in paste describes how eggs are used in the paste .ini configs. the python package index is the central network provider of information about and automatic vending of eggs.)

  • here are the various section types, to the degree that i understand them:




    a program designed to cooperate in the WSGI style


    an application made up of other applications; with a criterion that selects among the according to a condition


    a program that modifies a request before it is is sent to an application, to be used in application definitions via a filter-with = andpipeline = settings in application sections


    a filter definition which specifies the application to which the filter is applied


    a filter-app composed of a sequence of filters


    i'm unclear about this. it seems to be an application that is run as a server

in our configuration, the bottom two :main sections define a server that uses a pipeline composed, directly or indirectly, of the elements defined in prior sections of the file.

going more or less from bottom to top:

  • [server:main] - defines a paste http server, using the Paste package's httpobject/application - use = egg:Paste#http. parameters passed to the application are indicated by the other lines in the section. if you want the created server to be reached off-host

  • [pipeline:main] - adds a WSGI pipeline to the main server which consists of:

    • [filter:errorhandler] - based on the collective.fourohfour egg handler entry point for forwarding web responses over the WSGI pipeline to pages in plone.

    • egg:Paste#httpexceptions - the httpexceptions entry point of

      the Paste egg

    • [composite:vhost] - the use = ... makes this composite a "url mapper" (`Paste.urlmap`_), which effectively dispatches requests to specified applications depending on the request's path and domain.

      • [pipeline:zope] - constituted by a few repoze egg elements, an error log filter, and zope:

        • egg:repoze.retry#retry - middleware which implements retryable exceptions -

        • - zope-like transaction manager via WSGI -

        • egg:repoze.vhm#vhm_xheaders - repoze virtual hosting middleware, translating special environment settings to standard CGI forms -

        • [filter:errorlog] - uses the repoze errorlog facility, via an egg

        • [app:zope2] - a paste application constructed using the repoze.obob repoze component publisher. make_obob method, with parameters specified by the other lines in the section.

          the repoze.obob is the pivotal repoze component - a configurable object publisher by which you define the elements of an application which maps request URLs to python objects via graph traversal. see developing with repoze.zope2 for the developer's original introduction.

      • [pipeline:with-deliverance]:

        • [filter:deliverance] - here is the deliverance-egg based element, with a rule_filename parameter specifying the theme rules - located by default in theme/rules/default.xml relative to the build root.
        • [composite:static-fork] - another composite url mapper

in summary:

  • the main pipeline includes the vhost composite, which maps some requests to the zope pipeline and some to the with-deliverance pipeline, depending on the request domain and path.
  • the with-deliverance element is the front-end for most of the incoming requests, so deliverance can do its job to feed
  • from there, some of the requests wind up in the zope2 machinery (which also directs requests to python objects, depending on the request path and other incidentals)
  • in deliverance, fetching static html elements from the theme.
Document Actions