]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
Remove Django < 1.7 blocks
authorStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 15:52:47 +0000 (15:52 +0000)
committerStephen Finucane <stephen.finucane@intel.com>
Thu, 5 Nov 2015 15:52:47 +0000 (15:52 +0000)
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
patchwork/settings/dev.py
patchwork/settings/production.example.py
patchwork/tests/browser.py

index ab03814f4e27d5b8a8059401110377bc52700cb9..f0387278b308d03694c3b4a4a01056cb362c5117 100644 (file)
@@ -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
 
index e93249c6929e4e962952b1277fef4cd9452808ef..62dfe2ebbe9fe6ab6d57b3263982a4310c3c6866 100644 (file)
@@ -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
index 9cf6712ec1a19d6ef0cdb2a837610c49a8cfdd1c..41d6284a57d64e3821f7dcefe6bf7718abd206aa 100644 (file)
@@ -56,4 +56,3 @@ DATABASES = {
 #
 
 STATIC_ROOT = '/srv/patchwork/htdocs/static'
-
index 80285dbd6d6eefe7e37b37e7dec844097b7786c4..0af569344ab3721cd5a0e60c275352ce1c14e3ea 100644 (file)
@@ -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)