summaryrefslogtreecommitdiff
path: root/patchwork/settings
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2018-06-24 20:55:50 +0100
committerDaniel Axtens <dja@axtens.net>2018-08-26 16:58:21 +1000
commite97bd5ca0e8e3334e8402a71af8ebc2342da83ef (patch)
tree247bd28942f40fc352d523bf2ec9d3bbd0561b7c /patchwork/settings
parent4ad2558f884bf33201e179a171ad3821a62126a1 (diff)
downloadpatchwork-e97bd5ca0e8e3334e8402a71af8ebc2342da83ef.tar
patchwork-e97bd5ca0e8e3334e8402a71af8ebc2342da83ef.tar.gz
Remove support for Django 1.8, 1.9, 1.10
These are now all EOL and Debian Testing supports Django 1.11 (LTS). We can and should drop them. This change does not remove the many compat wrappers. These will be removed separately (there are a lot of them). This leaves 1.11 as the only supported version. This will be remedied shortly with the inclusion of Django 2.0 support. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Daniel Axtens <dja@axtens.net>
Diffstat (limited to 'patchwork/settings')
-rw-r--r--patchwork/settings/base.py17
-rw-r--r--patchwork/settings/dev.py19
-rw-r--r--patchwork/settings/production.example.py8
3 files changed, 15 insertions, 29 deletions
diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py
index 4b0d551..f96f369 100644
--- a/patchwork/settings/base.py
+++ b/patchwork/settings/base.py
@@ -4,14 +4,12 @@ Base settings for patchwork project.
import os
-import django
-
ROOT_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)),
os.pardir, os.pardir)
#
# Core settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
#
INSTALLED_APPS = [
@@ -26,7 +24,7 @@ INSTALLED_APPS = [
'patchwork',
]
-_MIDDLEWARE_CLASSES = [
+MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
@@ -37,11 +35,6 @@ _MIDDLEWARE_CLASSES = [
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
]
-if django.VERSION >= (1, 10):
- MIDDLEWARE = _MIDDLEWARE_CLASSES
-else:
- MIDDLEWARE_CLASSES = _MIDDLEWARE_CLASSES
-
TIME_ZONE = 'Australia/Canberra'
LANGUAGE_CODE = 'en-au'
@@ -83,7 +76,7 @@ SERVER_EMAIL = DEFAULT_FROM_EMAIL
#
# Auth settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#auth
+# https://docs.djangoproject.com/en/1.11/ref/settings/#auth
#
LOGIN_URL = 'auth_login'
@@ -93,7 +86,7 @@ LOGIN_REDIRECT_URL = 'user-profile'
#
# Sites settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#sites
+# https://docs.djangoproject.com/en/1.11/ref/settings/#sites
#
SITE_ID = 1
@@ -101,7 +94,7 @@ SITE_ID = 1
#
# Static files settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#static-files
+# https://docs.djangoproject.com/en/1.11/ref/settings/#static-files
#
STATIC_URL = '/static/'
diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py
index 0f79b61..7914880 100644
--- a/patchwork/settings/dev.py
+++ b/patchwork/settings/dev.py
@@ -9,13 +9,11 @@ Design based on:
from __future__ import absolute_import
-import django
-
from .base import * # noqa
#
# Core settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
#
@@ -47,11 +45,11 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
#
# Auth settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#auth
+# https://docs.djangoproject.com/en/1.11/ref/settings/#auth
#
# Use a faster, though less secure, password hasher for faster tests
-# https://docs.djangoproject.com/es/1.9/topics/testing/overview/#password-hashing
+# https://docs.djangoproject.com/es/1.11/topics/testing/overview/#password-hashing
PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']
#
@@ -67,14 +65,9 @@ INSTALLED_APPS += [
DEBUG_TOOLBAR_PATCH_SETTINGS = False
# This should go first in the middleware classes
-if django.VERSION >= (1, 10):
- MIDDLEWARE = [
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
- ] + MIDDLEWARE
-else:
- MIDDLEWARE_CLASSES = [
- 'debug_toolbar.middleware.DebugToolbarMiddleware',
- ] + MIDDLEWARE_CLASSES
+MIDDLEWARE = [
+ 'debug_toolbar.middleware.DebugToolbarMiddleware',
+] + MIDDLEWARE
INTERNAL_IPS = [
'127.0.0.1', '::1',
diff --git a/patchwork/settings/production.example.py b/patchwork/settings/production.example.py
index e97ba57..0c7a88c 100644
--- a/patchwork/settings/production.example.py
+++ b/patchwork/settings/production.example.py
@@ -15,7 +15,7 @@ from .base import * # noqa
#
# Core settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
#
# Security
@@ -51,7 +51,7 @@ ADMINS = (
#
# If you're using a postgres database, connecting over a local unix-domain
# socket, then the following setting should work for you. Otherwise,
-# see https://docs.djangoproject.com/en/1.8/ref/settings/#databases
+# see https://docs.djangoproject.com/en/1.11/ref/settings/#databases
DATABASES = {
'default': {
@@ -66,8 +66,8 @@ DATABASES = {
#
# Static files settings
-# https://docs.djangoproject.com/en/1.8/ref/settings/#static-files
-# https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/#manifeststaticfilesstorage
+# https://docs.djangoproject.com/en/1.11/ref/settings/#static-files
+# https://docs.djangoproject.com/en/1.11/ref/contrib/staticfiles/#manifeststaticfilesstorage
#
STATIC_ROOT = os.environ.get('STATIC_ROOT', '/srv/patchwork/htdocs/static')