diff options
author | Stephen Finucane <stephen.finucane@intel.com> | 2015-04-07 22:20:50 +0100 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2015-05-03 13:46:52 +0800 |
commit | 2c57a30465d96e6434f8715d650824c8ed8cfd5a (patch) | |
tree | b88143378ebe4f31a9fdf17d39f4deea9e367f42 | |
parent | 04e6689193c778fcfbff192e8d34af1dadf6560e (diff) | |
download | patchwork-2c57a30465d96e6434f8715d650824c8ed8cfd5a.tar patchwork-2c57a30465d96e6434f8715d650824c8ed8cfd5a.tar.gz |
settings: Resolve all but one Django 1.7 warning
Resolve remaining Django 1.7 warnings with the exception of a single
deprecation warning. However, this remaining issue is really a
non-issue due to the limited (and non-offending) use of the code.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | apps/settings.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/settings.py b/apps/settings.py index 379fbc5..9dbac19 100644 --- a/apps/settings.py +++ b/apps/settings.py @@ -1,5 +1,6 @@ # Django settings for patchwork project. import os +import django DEBUG = True TEMPLATE_DEBUG = DEBUG @@ -51,17 +52,23 @@ SECRET_KEY = '00000000000000000000000000000000000000000000000000' TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', -# 'django.template.loaders.eggs.load_template_source', ) -MIDDLEWARE_CLASSES = ( +MIDDLEWARE_CLASSES = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', -) +] + +if django.VERSION < (1, 7): + MIDDLEWARE_CLASSES.append('django.middleware.doc.XViewMiddleware') +else: + MIDDLEWARE_CLASSES.append( + 'django.contrib.admindocs.middleware.XViewMiddleware') + TEST_RUNNER = 'django.test.runner.DiscoverRunner' ROOT_URLCONF = 'urls' |