Skip to content

Commit

Permalink
Add support for django CMS 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed May 27, 2016
1 parent 0c169e1 commit eb6fdec
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
History
-------

0.8.10 (2016-05-28)
+++++++++++++++++++

* Add support for django CMS 3.3 final

0.8.9 (2016-05-19)
++++++++++++++++++

Expand Down
11 changes: 7 additions & 4 deletions djangocms_installer/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ def parse(args):
requirements.extend(data.REQUIREMENTS['cms-3.0'])
elif cms_version >= 3.2:
requirements.extend(data.REQUIREMENTS['cms-3.2'])
elif cms_version >= 3.3:
requirements.extend(data.REQUIREMENTS['cms-3.3'])
elif cms_version == 3.1:
requirements.extend(data.REQUIREMENTS['cms-3.1'])
else:
Expand All @@ -283,14 +285,15 @@ def parse(args):
else:
requirements.extend(data.REQUIREMENTS['plugins-common-master'])
requirements.extend(data.REQUIREMENTS['plugins-basic-master'])
if cms_version == 3:
requirements.extend(data.REQUIREMENTS['ckeditor-3.0'])
elif cms_version >= 3.3 or cms_version == 'rc':
if cms_version >= 3.3:
requirements.extend(data.REQUIREMENTS['ckeditor-3.3'])
elif cms_version >= 3.2:
elif cms_version == 3.2:
requirements.extend(data.REQUIREMENTS['ckeditor-3.2'])
elif cms_version == 3.1:
requirements.extend(data.REQUIREMENTS['ckeditor-3.1'])
if cms_version == 3:
requirements.extend(data.REQUIREMENTS['ckeditor-3.0'])

if args.aldryn: # pragma: no cover
requirements.extend(data.REQUIREMENTS['aldryn'])

Expand Down
15 changes: 9 additions & 6 deletions djangocms_installer/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
DJANGOCMS_BETA = 'https://github.com/divio/django-cms/archive/3.0.0.beta3.zip'

if sys.version_info < (2, 7):
DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', 'stable', 'develop')
DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', '3.3', 'stable', 'develop')
DJANGOCMS_STABLE = 3.2
elif sys.version_info >= (3, 5):
DJANGOCMS_SUPPORTED = ('3.0', '3.1', '3.2', 'stable', 'rc', 'develop')
DJANGOCMS_SUPPORTED = ('3.0', '3.1', '3.2', '3.3', 'stable', 'rc', 'develop')
DJANGOCMS_STABLE = 3.2
else:
DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', 'stable', 'rc', 'develop')
DJANGOCMS_SUPPORTED = ('2.4', '3.0', '3.1', '3.2', '3.3', 'stable', 'rc', 'develop')
DJANGOCMS_STABLE = 3.2

DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip?%s' % time.time()
Expand Down Expand Up @@ -116,7 +116,10 @@
'django-treebeard>=2.0',
],
'cms-3.2': [
'django-treebeard>=2.0',
'django-treebeard>=4.0',
],
'cms-3.3': [
'django-treebeard>=4.0',
],
'ckeditor-3.0': [
'djangocms-admin-style<0.3',
Expand All @@ -128,11 +131,11 @@
],
'ckeditor-3.2': [
'djangocms-admin-style>=1.0.6',
'djangocms-text-ckeditor>=2.8.1',
'djangocms-text-ckeditor>=2.8.1,<3.0',
],
'ckeditor-3.3': [
'djangocms-admin-style>=1.1.1',
'https://github.com/divio/djangocms-text-ckeditor/archive/develop.zip'
'djangocms-text-ckeditor>=3.0',
],
'plugins-common': [
'djangocms-column',
Expand Down
27 changes: 23 additions & 4 deletions tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,26 @@ def test_requirements(self):
self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
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('djangocms-text-ckeditor/archive/develop') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor>=3.0') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-admin-style') > -1)
self.assertTrue(conf_data.requirements.find('pytz') > -1)

conf_data = config.parse([
'-q',
'--db=postgres://user:pwd@host/dbname',
'--i18n=no',
'--cms-version=3.3',
'--django-version=stable',
'-f',
'--reversion=yes',
'-z=yes',
'-p'+self.project_dir,
'example_prj'])

self.assertTrue(conf_data.requirements.find('django-cms<3.4') > -1)
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('djangocms-text-ckeditor>=3.0') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-admin-style') > -1)
self.assertTrue(conf_data.requirements.find('pytz') > -1)

Expand All @@ -539,14 +558,14 @@ def test_requirements(self):
if sys.version_info < (2, 7):
self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8,<1.9') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor/archive/develop') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor>=3.0') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-admin-style>=1.1.1') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-teaser') > -1)
self.assertTrue(conf_data.requirements.find('south') > -1)
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('djangocms-text-ckeditor/archive/develop') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor>=3.0') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-admin-style>=1.1.1') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-teaser/archive/master.zip') > -1)
self.assertTrue(conf_data.requirements.find('south') == -1)
Expand Down Expand Up @@ -579,7 +598,7 @@ def test_requirements(self):
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-text-ckeditor>=3.0') == -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)
self.assertTrue(conf_data.requirements.find('south') == -1)
Expand Down

0 comments on commit eb6fdec

Please sign in to comment.