forked from orbit-oss/flask
working import layout for module
This commit is contained in:
parent
d0dc89ea80
commit
c4f64c1c47
9 changed files with 78 additions and 47 deletions
8
flask/globals.py
Normal file
8
flask/globals.py
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
from werkzeug import LocalStack, LocalProxy
|
||||
|
||||
# context locals
|
||||
_request_ctx_stack = LocalStack()
|
||||
current_app = LocalProxy(lambda: _request_ctx_stack.top.app)
|
||||
request = LocalProxy(lambda: _request_ctx_stack.top.request)
|
||||
session = LocalProxy(lambda: _request_ctx_stack.top.session)
|
||||
g = LocalProxy(lambda: _request_ctx_stack.top.g)
|
||||
Loading…
Add table
Add a link
Reference in a new issue