1 from forum import settings
3 def application_settings(context):
4 return {'settings': settings}
6 def auth_processor(request):
8 Returns context variables required by apps that use Django's authentication
11 If there is no 'user' attribute in the request, uses AnonymousUser (from
14 if hasattr(request, 'user'):
16 if user.is_authenticated():
17 messages = user.message_set.all()
21 from django.contrib.auth.models import AnonymousUser
22 user = AnonymousUser()
25 from django.core.context_processors import PermWrapper
29 'perms': PermWrapper(user),