use the more natural 'django.VERSION < (1.7)' for version tests

This commit is contained in:
Matt Westcott 2014-08-27 15:54:00 +01:00
parent 075c9e8da0
commit 2640258450
2 changed files with 3 additions and 3 deletions

View file

@ -76,7 +76,7 @@ INSTALLED_APPS = [
]
# If we are using Django 1.6, add South to INSTALLED_APPS
if django.VERSION[:2] == (1, 6):
if django.VERSION < (1, 7):
INSTALLED_APPS.append('south')
@ -84,7 +84,7 @@ if django.VERSION[:2] == (1, 6):
# Theres nothing special about wagtailredirects, we just need to have one
# app which uses AppConfigs to test that hooks load properly
if django.VERSION[:2] == (1, 6):
if django.VERSION < (1, 7):
INSTALLED_APPS.append('wagtail.wagtailredirects')
else:
INSTALLED_APPS.append('wagtail.wagtailredirects.apps.WagtailRedirectsAppConfig')

View file

@ -14,7 +14,7 @@ def get_app_modules():
Generator function that yields a module object for each installed app
yields tuples of (app_name, module)
"""
if django.VERSION[:2] == (1, 6):
if django.VERSION < (1, 7):
# Django 1.6
for app in settings.INSTALLED_APPS:
yield app, import_module(app)