Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Use LooseVersion for Django version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Mykhailo Kolesnyk committed Oct 28, 2015
1 parent b76b568 commit 719415a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import unicode_literals

from distutils.version import LooseVersion
from django import get_version, VERSION as DJANGO_VERSION
from django import get_version

django_version = LooseVersion(get_version())

Expand All @@ -21,7 +21,7 @@
'ALDRYN_BOILERPLATE_NAME': 'test-boilerplate',
}

if DJANGO_VERSION < (1, 6):
if django_version < LooseVersion('1.6'):
HELPER_SETTINGS.update({
'STATICFILES_FINDERS': [
'django.contrib.staticfiles.finders.FileSystemFinder',
Expand Down Expand Up @@ -60,7 +60,7 @@ def run():
# --boilerplate option will ensure correct boilerplate settings are
# added to settings

if DJANGO_VERSION < (1, 6):
if django_version < LooseVersion('1.6'):
runner.cms('aldryn_boilerplates')
else:
runner.cms('aldryn_boilerplates', extra_args=['--boilerplate'])
Expand Down

0 comments on commit 719415a

Please sign in to comment.