Skip to content

Commit

Permalink
Fix mptt version
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Apr 20, 2016
1 parent 61ec183 commit 9787751
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
13 changes: 13 additions & 0 deletions djangocms_installer/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,19 @@ def parse(args):
elif django_version == 1.9:
requirements.extend(data.REQUIREMENTS['reversion-django-1.9'])

if django_version < 1.5:
requirements.extend(data.REQUIREMENTS['django-1.4'])
elif django_version == 1.5:
requirements.extend(data.REQUIREMENTS['django-1.5'])
elif django_version == 1.6:
requirements.extend(data.REQUIREMENTS['django-1.6'])
elif django_version == 1.7:
requirements.extend(data.REQUIREMENTS['django-1.7'])
elif django_version == 1.8:
requirements.extend(data.REQUIREMENTS['django-1.8'])
elif django_version == 1.9:
requirements.extend(data.REQUIREMENTS['django-1.9'])

requirements.extend(data.REQUIREMENTS['default'])

setattr(args, 'requirements', '\n'.join(requirements).strip())
Expand Down
18 changes: 16 additions & 2 deletions djangocms_installer/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,20 @@
'django-legacy': [
'south>=1.0.0',
],
'django-1.4': [
],
'django-1.5': [
],
'django-1.6': [
],
'django-1.7': [
],
'django-1.8': [
'django-mptt<0.9',
],
'django-1.9': [
'django-mptt<0.9',
],
'reversion-django-1.4': [
'django-reversion<1.7',
],
Expand All @@ -95,7 +109,7 @@
'django-mptt>=0.5.1,<0.5.3',
],
'cms-3.0': [
'django-mptt<0.7',
'django-mptt<0.8',
],
'cms-3.1': [
'django-treebeard>=2.0',
Expand All @@ -120,10 +134,10 @@
'djangocms-googlemap',
'djangocms-inherit',
'djangocms-style',
'djangocms-link',
],
'plugins-basic': [
'djangocms-file',
'djangocms-link',
'djangocms-picture',
'djangocms-teaser',
'djangocms-video',
Expand Down
3 changes: 2 additions & 1 deletion tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def test_requirements(self):
else:
self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
self.assertTrue(conf_data.requirements.find('django-mptt') == -1)
self.assertTrue(conf_data.requirements.find('django-mptt<0.9') >= -1)
self.assertTrue(conf_data.requirements.find('django-treebeard') > -1)

conf_data = config.parse([
Expand Down Expand Up @@ -584,6 +584,7 @@ def test_requirements(self):
else:
self.assertTrue(conf_data.requirements.find('Django<1.9') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8.7') > -1)
self.assertTrue(conf_data.requirements.find('django-mptt<0.9') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/master.zip') == -1)
self.assertTrue(conf_data.requirements.find('djangocms-admin-style/archive/master.zip') == -1)
self.assertTrue(conf_data.requirements.find('djangocms-teaser/archive/master.zip') == -1)
Expand Down

0 comments on commit 9787751

Please sign in to comment.