@@ -36,11 +36,8 @@ MIDDLEWARE_CLASSES = [
'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')
+MIDDLEWARE_CLASSES.append(
+ 'django.contrib.admindocs.middleware.XViewMiddleware')
# Globalization
@@ -41,12 +41,9 @@ DATABASES = {
},
}
-if django.VERSION < (1, 7):
- DATABASES['default']['TEST_CHARSET'] = 'utf8'
-else:
- DATABASES['default']['TEST'] = {
- 'CHARSET': 'utf8',
- }
+DATABASES['default']['TEST'] = {
+ 'CHARSET': 'utf8',
+}
#
# Patchwork settings
@@ -56,4 +56,3 @@ DATABASES = {
#
STATIC_ROOT = '/srv/patchwork/htdocs/static'
-
@@ -21,10 +21,7 @@ import errno
import os
import time
-try: # django 1.7+
- from django.contrib.staticfiles.testing import StaticLiveServerTestCase
-except:
- from django.test import LiveServerTestCase as StaticLiveServerTestCase
+from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from selenium.common.exceptions import (
NoSuchElementException, StaleElementReferenceException,
TimeoutException)
Seeing as we no longer support these versions of Django, there is no need to keep these blocks around. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com> --- patchwork/settings/base.py | 7 ++----- patchwork/settings/dev.py | 9 +++------ patchwork/settings/production.example.py | 1 - patchwork/tests/browser.py | 5 +---- 4 files changed, 6 insertions(+), 16 deletions(-)