From: Stephen Finucane Date: Thu, 5 Nov 2015 15:52:47 +0000 (+0000) Subject: Remove Django < 1.7 blocks X-Git-Tag: v1.1.0~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea050ad02c61ff1f0bd03ffb02b4706817401aee;p=thirdparty%2Fpatchwork.git Remove Django < 1.7 blocks Seeing as we no longer support these versions of Django, there is no need to keep these blocks around. Signed-off-by: Stephen Finucane --- diff --git a/patchwork/settings/base.py b/patchwork/settings/base.py index ab03814f..f0387278 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 e93249c6..62dfe2eb 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 9cf6712e..41d6284a 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 80285dbd..0af56934 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)