]> git.openstreetmap.org Git - osqa.git/blob - forum/context.py
Remove ADMIN_MEDIA_PREFIX since it has been deprecated in Django 1.4
[osqa.git] / forum / context.py
1 from forum import settings
2
3 def application_settings(context):
4     return {'settings': settings}
5
6 def auth_processor(request):
7     if hasattr(request, 'user'):
8         user = request.user
9     else:
10         from django.contrib.auth.models import AnonymousUser
11         user = AnonymousUser()
12
13     from django.core.context_processors import PermWrapper
14     return {
15         'user': user,
16         'perms': PermWrapper(user),
17     }