summaryrefslogtreecommitdiffstats
path: root/settings.py
diff options
context:
space:
mode:
authorwookey <devnull@localhost>2013-07-02 21:05:48 +0100
committerwookey <devnull@localhost>2013-07-02 21:05:48 +0100
commita376044fdfefb1c02cd6a71b637419c568c96897 (patch)
treead74b25e1a04a3d0d2f362589ab6e651f08e4c52 /settings.py
parent0dfbd1c84f13ee18451f739987f918cb5ac620ab (diff)
downloadtroggle-a376044fdfefb1c02cd6a71b637419c568c96897.tar.gz
troggle-a376044fdfefb1c02cd6a71b637419c568c96897.tar.bz2
troggle-a376044fdfefb1c02cd6a71b637419c568c96897.zip
Add support for old and new (1.4 on) location for auth module.
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/settings.py b/settings.py
index 1d2d423..47d48ae 100644
--- a/settings.py
+++ b/settings.py
@@ -57,7 +57,12 @@ TEMPLATE_LOADERS = (
# 'django.template.loaders.eggs.load_template_source',
)
-TEMPLATE_CONTEXT_PROCESSORS = ( "django.core.context_processors.auth", "core.context.troggle_context", )
+if django.VERSION[0] == 1 and django.VERSION[1] < 4:
+ authmodule = 'django.core.context_processors.auth'
+else:
+ authmodule = 'django.contrib.auth.context_processors.auth'
+
+TEMPLATE_CONTEXT_PROCESSORS = ( authmodule, "core.context.troggle_context", )
LOGIN_REDIRECT_URL = '/'