[Grok-dev] Re: The old request object, where do I look?

Sebastian Ware sebastian at urbantalk.se
Mon Aug 13 11:04:56 EDT 2007


I am eagerly awaiting the docs etc. :)

Mvh Sebastian

13 aug 2007 kl. 16.03 skrev Martijn Faassen:

> Hey,
>
> 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 are you looking for?
>
>> -What members does self.request have?
>
> request.form tends to contain useful information.
>
>> -What is available in self.request.principal? (I want to access  
>> user credentials)
>
> The principal is object representing the user. What do you mean by  
> accessing user credentials?
>
>> -Any other useful objects?
>> I have looked in the interface  
>> zope.publisher.interfaces.http.IHTTPRequest, but not found much  
>> information.
>
> Typically you deal with a derived interface from that,  
> IBrowserRequest:
>
> zope.publisher.interfaces.browser.IBrowserRequest
>
> This one defines 'form'
>
> This also derives from IHTTPApplicationRequest:
>
> zope.publisher.interfaces.http.IHTTPApplicationRequest
>
> This one defines 'cookies', 'headers', 'URL', and a whole bunch of  
> methods.
>
> All this also derives from  
> zope.publisher.interfaces.IApplicationRequest, which defines more  
> stuff.
>
> It's all very much factored, which indeed makes it harder to find  
> stuff in one place. Our admin interface should eventually help, and  
> so should a grok reference.
>
> Regards,
>
> Martijn
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list