1 from forum import settings
2 from django.conf import settings as djsettings
4 def application_settings(context):
6 'APP_TITLE' : settings.APP_TITLE,
7 'APP_SHORT_NAME' : settings.APP_SHORT_NAME,
8 'APP_URL' : settings.APP_URL,
9 'APP_KEYWORDS' : settings.APP_KEYWORDS,
10 'APP_DESCRIPTION' : settings.APP_DESCRIPTION,
11 'APP_INTRO' : settings.APP_INTRO,
12 'APP_LOGO' : settings.APP_LOGO,
13 'EMAIL_VALIDATION': 'off',
14 'FEEDBACK_SITE_URL': settings.FEEDBACK_SITE_URL,
15 'FORUM_SCRIPT_ALIAS': djsettings.FORUM_SCRIPT_ALIAS,
16 'LANGUAGE_CODE': djsettings.LANGUAGE_CODE,
17 'GOOGLE_SITEMAP_CODE':settings.GOOGLE_SITEMAP_CODE,
18 'GOOGLE_ANALYTICS_KEY':settings.GOOGLE_ANALYTICS_KEY,
19 'WIKI_ON':settings.WIKI_ON,
20 'OSQA_SKIN':djsettings.OSQA_DEFAULT_SKIN,
21 'APP_FAVICON':settings.APP_FAVICON,
22 'OSQA_VERSION': settings.OSQA_VERSION,
23 'ADMIN_MEDIA_PREFIX': djsettings.ADMIN_MEDIA_PREFIX,
24 'SVN_REVISION': settings.SVN_REVISION,
26 return {'settings':my_settings}
28 def auth_processor(request):
30 Returns context variables required by apps that use Django's authentication
33 If there is no 'user' attribute in the request, uses AnonymousUser (from
36 if hasattr(request, 'user'):
38 if user.is_authenticated():
39 messages = user.message_set.all()
43 from django.contrib.auth.models import AnonymousUser
44 user = AnonymousUser()
47 from django.core.context_processors import PermWrapper
51 'perms': PermWrapper(user),