diff --git a/djangocms_installer/config/__init__.py b/djangocms_installer/config/__init__.py index e7daa2b..b7665c4 100644 --- a/djangocms_installer/config/__init__.py +++ b/djangocms_installer/config/__init__.py @@ -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()) diff --git a/djangocms_installer/config/data.py b/djangocms_installer/config/data.py index cd05185..7dfa39e 100644 --- a/djangocms_installer/config/data.py +++ b/djangocms_installer/config/data.py @@ -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', ], @@ -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', @@ -120,10 +134,10 @@ 'djangocms-googlemap', 'djangocms-inherit', 'djangocms-style', + 'djangocms-link', ], 'plugins-basic': [ 'djangocms-file', - 'djangocms-link', 'djangocms-picture', 'djangocms-teaser', 'djangocms-video', diff --git a/tests/config.py b/tests/config.py index 04c979b..a715823 100644 --- a/tests/config.py +++ b/tests/config.py @@ -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([ @@ -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)