You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
327 B
17 lines
327 B
import threading
|
|
|
|
_store = threading.local()
|
|
_store.user = None
|
|
|
|
def set_user(user):
|
|
"""\
|
|
Sets the current request's logged-in user. user should be a
|
|
afe.models.User object.
|
|
"""
|
|
_store.user = user
|
|
|
|
|
|
def get_user():
|
|
'Get the currently logged-in user as a afe.models.User object.'
|
|
return _store.user
|