pyramid.threadlocal¶
- get_current_request()[ソース]¶
Return the currently active request or
Noneif no request is currently active.This function should be used extremely sparingly, usually only in unit testing code. It's almost always usually a mistake to use
get_current_requestoutside a testing context because its usage makes it possible to write code that can be neither easily tested nor scripted.
- get_current_registry()[ソース]¶
Return the currently active application registry or the global application registry if no request is currently active.
This function should be used extremely sparingly, usually only in unit testing code. It's almost always usually a mistake to use
get_current_registryoutside a testing context because its usage makes it possible to write code that can be neither easily tested nor scripted.