[Grok-dev] Re: The old request object, where do I look?
Philipp von Weitershausen
philipp at weitershausen.de
Thu Aug 16 15:41:07 EDT 2007
Sebastian Ware wrote:
> During a request, which useful objects are available? I am having
> difficulties finding where to look. What I would like to know is:
>
> -What members does self.request have?
Look at IBrowserRequest from zope.publisher.interfaces.browser. The
APIDoc tool is a great resource for this. I also want to make the APIDoc
pages available online on grok.zope.org.
> -What is available in self.request.principal? (I want to access user
> credentials)
Look at zope.security.interfaces.IPrincipal.
> -Any other useful objects?
Um, depends on what you want to do and where you are?!?
> I have looked in the interface
> zope.publisher.interfaces.http.IHTTPRequest, but not found much
> information.
That's hard to believe. You need to look at the base interfaces, too.
Plus, IHTTPRequest is just part of the interface that a browser request
provides. It all comes down to IBrowserRequest.
> I have also looked in Philipps book but not found any
> birdseyes view on this.
I'm not sure what kind of birds eye view you'd like to have. You're
talking about two specific objects above. Both of them find excessive
mentioning in my book, and each time I explain which interface they
provide. I also explain the APIDoc tool so that you can go and look at
those interfaces.
--
http://worldcookery.com -- Professional Zope documentation and training
More information about the Grok-dev
mailing list