summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Baker <andy@andybak.net>2015-07-07 14:04:39 (GMT)
committerAndy Baker <andy@andybak.net>2015-07-07 14:04:39 (GMT)
commit03935c8ef9ded04272b3096a7d1b815dd0ab597e (patch)
treee9b0fd0d5e628424767a74e8c8c1c86cc2e41cd0
parente97bd353b8f4dbc1b578aa3ad25aa6acc336830f (diff)
downloaddjango-admin-tools-03935c8ef9ded04272b3096a7d1b815dd0ab597e.zip
django-admin-tools-03935c8ef9ded04272b3096a7d1b815dd0ab597e.tar.gz
django-admin-tools-03935c8ef9ded04272b3096a7d1b815dd0ab597e.tar.bz2
fix version check
-rw-r--r--test_proj/settings.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test_proj/settings.py b/test_proj/settings.py
index 2cdba2c..b702e91 100644
--- a/test_proj/settings.py
+++ b/test_proj/settings.py
@@ -102,9 +102,10 @@ ROOT_URLCONF = 'test_proj.urls'
WSGI_APPLICATION = 'test_proj.wsgi.application'
import django
+from distutils.version import LooseVersion
version = django.get_version()
-
-if version < '1.8':
+use_older_syntax = LooseVersion(django.get_version()) < LooseVersion('1.8')
+if use_older_syntax:
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.