[Zope-dev] zope.globalrequest?
Martijn Faassen
faassen at startifact.com
Mon Jan 19 09:57:57 EST 2009
Andreas Jung wrote:
> On 17.01.2009 8:39 Uhr, Dieter Maurer wrote:
[snip]
>> It is good to be able to access both "site" and "request" in
>> a standard way.
>
> And it similiar accessing the current transaction using
>
> import transaction
> tx = transaction.get()
>
> So: +1
+1 too. For Zope 2 and for Zope 3.
In some cases it's really hard to get to the request otherwise. Take a
look at zc.resourcelibrary for a Zope 3 library that could use
zope.globalrequest. Right now it doesn't use an abstraction but just
cheats by knowing the implementation. Or hurry.zoperesource, which uses
the same pattern.
Regards,
Martijn
More information about the Zope-Dev
mailing list