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

pull/572/merge
Matt Westcott 2014-08-27 15:54:00 +01:00
rodzic 075c9e8da0
commit 2640258450
2 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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')

Wyświetl plik

@ -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)