fix version check
This commit is contained in:
parent
e97bd353b8
commit
03935c8ef9
|
@ -102,9 +102,10 @@ ROOT_URLCONF = 'test_proj.urls'
|
||||||
WSGI_APPLICATION = 'test_proj.wsgi.application'
|
WSGI_APPLICATION = 'test_proj.wsgi.application'
|
||||||
|
|
||||||
import django
|
import django
|
||||||
|
from distutils.version import LooseVersion
|
||||||
version = django.get_version()
|
version = django.get_version()
|
||||||
|
use_older_syntax = LooseVersion(django.get_version()) < LooseVersion('1.8')
|
||||||
if version < '1.8':
|
if use_older_syntax:
|
||||||
TEMPLATE_DIRS = (
|
TEMPLATE_DIRS = (
|
||||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||||
# Always use forward slashes, even on Windows.
|
# Always use forward slashes, even on Windows.
|
||||||
|
|
Loading…
Reference in New Issue