Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
# the existance of __init__.py make this a module... | ||
from zope.interface.declarations import moduleProvides | ||
from zope.globalrequest.interfaces import IGlobalRequest | ||
|
||
moduleProvides(IGlobalRequest) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from zope.interface import Interface | ||
|
||
|
||
class IGlobalRequest(Interface): | ||
""" interface to handle retrieval and setting of the currently | ||
used request object in a thread-local manner """ | ||
|
||
def getRequest(): | ||
""" return the currently active request object """ | ||
|
||
def setRequest(request): | ||
""" set the request object to be returned by `getRequest` """ | ||
|
||
def clearRequest(): | ||
""" clear the stored request object """ | ||
|