12 lines
285 B
Python
12 lines
285 B
Python
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')}
|