[Grok-dev] grok.url() requiring a request object a bit inconvenient
Martijn Faassen
faassen at startifact.com
Tue Nov 3 11:40:56 EST 2009
Jan-Wijbrand Kolman wrote:
> There're a couple of packages out there that do get to the "global"
> request. We should look that these packages for inspiration when
> implementing grok.global_request(). On the top of my head there is:
>
> * hurry.resource (or is it hurry.zope.resource)
The latter (hurry.zoperesource), as hurry.resource doesn't know anything
about Zope.
> * zope.globalrequest
I think the simplest thing would be to simply make Grok depend on
zope.globalrequest and import the method to get the global request into
the grok namespace.
I'm +1 on that approach.
Regards,
Martijn
More information about the Grok-dev
mailing list