--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hdalab/context_processors.py Wed Dec 10 15:51:08 2014 +0100
@@ -0,0 +1,4 @@
+import hdalab
+
+def version(request):
+ return { 'VERSION': hdalab.get_version() }
\ No newline at end of file
--- a/src/hdalab/settings.py Wed Dec 10 15:22:40 2014 +0100
+++ b/src/hdalab/settings.py Wed Dec 10 15:51:08 2014 +0100
@@ -114,6 +114,19 @@
'django.contrib.messages.middleware.MessageMiddleware',
)
+# List of processors used by RequestContext to populate the context.
+# Each one should be a callable that takes the request object as its
+# only parameter and returns a dictionary to add to the context.
+TEMPLATE_CONTEXT_PROCESSORS = (
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.media',
+ 'django.core.context_processors.static',
+ 'django.contrib.messages.context_processors.messages',
+ 'hdalab.context_processors.version',
+)
+
ROOT_URLCONF = 'hdalab.urls'
TEMPLATE_DIRS = (