diff mbox

[v2,4/4] Remove Django < 1.7 blocks

Message ID 1446739261-13455-5-git-send-email-stephen.finucane@intel.com
State Accepted
Headers show

Commit Message

Stephen Finucane Nov. 5, 2015, 4:01 p.m. UTC
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(-)
diff mbox

Patch

diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py
index ab03814..f038727 100644
--- a/patchwork/settings/base.py
+++ b/patchwork/settings/base.py
@@ -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
 
diff --git a/patchwork/settings/dev.py b/patchwork/settings/dev.py
index e93249c..62dfe2e 100644
--- a/patchwork/settings/dev.py
+++ b/patchwork/settings/dev.py
@@ -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
diff --git a/patchwork/settings/production.example.py b/patchwork/settings/production.example.py
index 9cf6712..41d6284 100644
--- a/patchwork/settings/production.example.py
+++ b/patchwork/settings/production.example.py
@@ -56,4 +56,3 @@  DATABASES = {
 #
 
 STATIC_ROOT = '/srv/patchwork/htdocs/static'
-
diff --git a/patchwork/tests/browser.py b/patchwork/tests/browser.py
index 80285db..0af5693 100644
--- a/patchwork/tests/browser.py
+++ b/patchwork/tests/browser.py
@@ -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)