init commit
This commit is contained in:
11
ui/context_processors.py
Normal file
11
ui/context_processors.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from django.conf import settings
|
||||
|
||||
def public_settings(request):
|
||||
return {
|
||||
'DEBUG': settings.DEBUG,
|
||||
}
|
||||
|
||||
def current_user(request):
|
||||
# Very lightweight 'user' from API token in session
|
||||
auth = request.session.get('auth', {})
|
||||
return {'api_user': auth.get('user')}
|
||||
Reference in New Issue
Block a user