diff options
author | wookey <devnull@localhost> | 2013-07-02 21:05:48 +0100 |
---|---|---|
committer | wookey <devnull@localhost> | 2013-07-02 21:05:48 +0100 |
commit | a6a9016548640126569bb2745136bf001500d99c (patch) | |
tree | f8e89e4853ec484a5820ce4f4b2a7f8339751c06 /settings.py | |
parent | f3a570a21daa84e2e0abc079ef84f813aa15969a (diff) | |
download | troggle-a6a9016548640126569bb2745136bf001500d99c.tar.gz troggle-a6a9016548640126569bb2745136bf001500d99c.tar.bz2 troggle-a6a9016548640126569bb2745136bf001500d99c.zip |
Add support for old and new (1.4 on) location for auth module.
Diffstat (limited to 'settings.py')
-rw-r--r-- | settings.py | 7 |
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 = '/' |