From a376044fdfefb1c02cd6a71b637419c568c96897 Mon Sep 17 00:00:00 2001 From: wookey Date: Tue, 2 Jul 2013 21:05:48 +0100 Subject: [PATCH] Add support for old and new (1.4 on) location for auth module. --- settings.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 = '/'