X-Git-Url: https://git.openstreetmap.org./osqa.git/blobdiff_plain/1a949f7c97dc2f34c135f5cdf088df2927d3d652..a2ec2f27ec1831bb0df68aba082d75a260a1a205:/forum/context.py diff --git a/forum/context.py b/forum/context.py index 3814bb6..641af38 100644 --- a/forum/context.py +++ b/forum/context.py @@ -1,34 +1,9 @@ -from django.conf import settings +from forum import settings + def application_settings(context): - my_settings = { - 'APP_TITLE' : settings.APP_TITLE, - 'APP_SHORT_NAME' : settings.APP_SHORT_NAME, - 'APP_URL' : settings.APP_URL, - 'APP_KEYWORDS' : settings.APP_KEYWORDS, - 'APP_DESCRIPTION' : settings.APP_DESCRIPTION, - 'APP_INTRO' : settings.APP_INTRO, - 'APP_LOGO' : settings.APP_LOGO, - 'EMAIL_VALIDATION': settings.EMAIL_VALIDATION, - 'FEEDBACK_SITE_URL': settings.FEEDBACK_SITE_URL, - 'FORUM_SCRIPT_ALIAS': settings.FORUM_SCRIPT_ALIAS, - 'LANGUAGE_CODE': settings.LANGUAGE_CODE, - 'GOOGLE_SITEMAP_CODE':settings.GOOGLE_SITEMAP_CODE, - 'GOOGLE_ANALYTICS_KEY':settings.GOOGLE_ANALYTICS_KEY, - 'WIKI_ON':settings.WIKI_ON, - 'RESOURCE_REVISION':settings.RESOURCE_REVISION, - 'OSQA_SKIN':settings.OSQA_DEFAULT_SKIN, - 'APP_FAVICON':settings.APP_FAVICON, - } - return {'settings':my_settings} + return {'settings': settings} def auth_processor(request): - """ - Returns context variables required by apps that use Django's authentication - system. - - If there is no 'user' attribute in the request, uses AnonymousUser (from - django.contrib.auth). - """ if hasattr(request, 'user'): user = request.user if user.is_authenticated():