[Zope-dev] acquisition of REQUEST?

Hanno Schlichting hannosch at hannosch.eu
Thu Oct 30 09:09:17 EDT 2008


Jürgen Herrmann wrote:
> i'm searching for the code where acquisition of "aPersistent.REQUEST" is handled
> in zope 2.10?

ZPublisher.BaseRequest in the traverse method line 401:

# Traverse the URL to find the object:
if hasattr(object, '__of__'):
    # Try to bind the top-level object to the request
    # This is how you get 'self.REQUEST'
    object=object.__of__(RequestContainer(REQUEST=request))

Hanno



More information about the Zope-Dev mailing list