summaryrefslogtreecommitdiffstats
path: root/askbot/context.py
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-01-05 16:17:45 -0500
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-01-05 16:17:45 -0500
commita5cf08b3f6f43f0d8c9c38a233380e03b1f253c6 (patch)
tree9b3a798715088bcb954fc8275960e2d96c0c8c43 /askbot/context.py
parent717debc97eb97199c343a5699b04fd2af8e3c858 (diff)
downloadaskbot-a5cf08b3f6f43f0d8c9c38a233380e03b1f253c6.tar.gz
askbot-a5cf08b3f6f43f0d8c9c38a233380e03b1f253c6.tar.bz2
askbot-a5cf08b3f6f43f0d8c9c38a233380e03b1f253c6.zip
made the enthusiast badge work and added version display to the footer template
Diffstat (limited to 'askbot/context.py')
-rw-r--r--askbot/context.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/askbot/context.py b/askbot/context.py
index 47930aef..94257f63 100644
--- a/askbot/context.py
+++ b/askbot/context.py
@@ -1,13 +1,19 @@
+"""Askbot template context processor that makes some parameters
+from the django settings, all parameters from the askbot livesettings
+and the application available for the templates
+"""
from django.conf import settings
-from askbot.conf import settings as askbot_settings
+import askbot
from askbot import api
-import datetime
+from askbot.conf import settings as askbot_settings
def application_settings(request):
+ """The context processor function"""
my_settings = askbot_settings.as_dict()
my_settings['LANGUAGE_CODE'] = settings.LANGUAGE_CODE
my_settings['ASKBOT_URL'] = settings.ASKBOT_URL
my_settings['DEBUG'] = settings.DEBUG
+ my_settings['ASKBOT_VERSION'] = askbot.get_version()
return {
'settings': my_settings,
'moderation_items': api.get_info_on_moderation_items(request.user)