Skip to content

Commit

Permalink
Merge pull request #90 from nephila/feature/cms_3_release
Browse files Browse the repository at this point in the history
django CMS 3 release!
  • Loading branch information
yakky committed Apr 9, 2014
2 parents 0195093 + 363e889 commit bc8099a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 26 deletions.
7 changes: 7 additions & 0 deletions HISTORY.rst
Expand Up @@ -60,4 +60,11 @@ History

* Update for django CMS 3.0c2

0.4 (2014-04-09)
++++++++++++++++

* Update for django CMS 3.0 stable!
* Fixes for settings parameter



2 changes: 1 addition & 1 deletion djangocms_installer/__init__.py
Expand Up @@ -2,4 +2,4 @@
# -*- coding: utf-8 -*-
__author__ = 'Iacopo Spalletti'
__email__ = 'i.spalletti@nephila.it'
__version__ = '0.3.5'
__version__ = '0.4.0'
2 changes: 1 addition & 1 deletion djangocms_installer/config/__init__.py
Expand Up @@ -41,7 +41,7 @@ def parse(args):
choices=('1.4', '1.5', '1.6', 'stable'),
default='1.5', help='Django version')
parser.add_argument('--cms-version', '-v', dest='cms_version', action='store',
choices=('2.4', 'stable', 'rc', 'develop'),
choices=('2.4', '3.0', 'stable', 'develop'),
default='stable', help='django CMS version')
parser.add_argument('--parent-dir', '-p', dest='project_directory',
required=True, default='',
Expand Down
2 changes: 1 addition & 1 deletion djangocms_installer/config/data.py
Expand Up @@ -6,7 +6,7 @@
DJANGOCMS_DEVELOP = '-e git+https://github.com/divio/django-cms@develop#egg=django-cms'
DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/3.0c2.zip'
DJANGOCMS_BETA = 'https://github.com/divio/django-cms/archive/3.0.0.beta3.zip'
DJANGOCMS_LATEST = '2.4'
DJANGOCMS_LATEST = '3.0'

DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip'
DJANGO_LATEST = '1.5' # this is not true, but it's the most recent version
Expand Down
2 changes: 1 addition & 1 deletion djangocms_installer/utils.py
Expand Up @@ -52,7 +52,7 @@ def supported_versions(django, cms):
cms_version = float(cms)
except ValueError:
if cms == 'stable':
cms_version = 2.4
cms_version = 3.0
elif django == 'rc':
django_version = 3.0
elif django == 'beta':
Expand Down
4 changes: 2 additions & 2 deletions docs/reference.rst
Expand Up @@ -24,8 +24,8 @@ The following arguments can be overridden in :ref:`wizard_mode`
* ``--reversion``, ``-e``: Install and configure reversion support, choices: ``yes|no``, default: ``yes``
* ``--permissions``: Activate CMS permission management; choices: ``yes|no``, default: ``yes``
* ``--languages``, ``-l``: Languages to enable. Option can be provided multiple times, or as a comma separated list
* ``--django-version``: Django version; choices: ``1.4|1.5|stable``, default: ``stable``
* ``--cms-version``, ``-v``: django CMS version, choices: ``2.4|stable|beta|develop``. default: ``stable``
* ``--django-version``: Django version; choices: ``1.4|1.5|1.6|stable``, default: ``stable``
* ``--cms-version``, ``-v``: django CMS version, choices: ``2.4|3.0|stable|develop``. default: ``stable``
* ``--bootstrap``, ``-v``: Use Twitter Bootstrap as theme, choices: ``yes|no``, default: ``no``
* ``--starting-page``, ``-v``: Load a starting page with examples after installation, choices: ``yes|no``, default: ``no``

Expand Down
24 changes: 12 additions & 12 deletions tests/config.py
Expand Up @@ -20,7 +20,7 @@ def test_default_config(self):

self.assertEqual(conf_data.project_name, 'example_prj')

self.assertEqual(conf_data.cms_version, 2.4)
self.assertEqual(conf_data.cms_version, 3.0)
self.assertEqual(conf_data.django_version, 1.5)
self.assertEqual(conf_data.i18n, 'yes')
self.assertEqual(conf_data.reversion, 'yes')
Expand Down Expand Up @@ -164,18 +164,18 @@ def test_requirements(self):
'-p'+self.project_dir,
'example_prj'])

self.assertTrue(conf_data.requirements.find('django-cms<2.5') > -1)
self.assertTrue(conf_data.requirements.find('django-cms<3.1') > -1)
self.assertTrue(conf_data.requirements.find('Django<1.5') > -1)
self.assertTrue(conf_data.requirements.find('django-filer') > -1)
self.assertTrue(conf_data.requirements.find('cmsplugin_filer') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion<1.7') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') == -1)
self.assertTrue(conf_data.requirements.find('cmsplugin-filer') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') > -1)

conf_data = config.parse([
'-q',
'--db=postgres://user:pwd@host/dbname',
'--i18n=no',
'--cms-version=stable',
'--cms-version=2.4',
'--django-version=stable',
'-f',
'-p'+self.project_dir,
Expand All @@ -202,13 +202,13 @@ def test_requirements(self):
'-q',
'--db=postgres://user:pwd@host/dbname',
'--i18n=no',
'--cms-version=rc',
'--cms-version=stable',
'--django-version=stable',
'--reversion=yes',
'-p'+self.project_dir,
'example_prj'])

self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_RC) > -1)
self.assertTrue(conf_data.requirements.find('django-cms<3.1') > -1)
self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') > -1)
Expand All @@ -228,14 +228,14 @@ def test_requirements(self):
'-q',
'--db=postgres://user:pwd@host/dbname',
'--i18n=no',
'--cms-version=rc',
'--cms-version=develop',
'--django-version=stable',
'-f',
'--reversion=yes',
'-p'+self.project_dir,
'example_prj'])

self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_RC) > -1)
self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
self.assertTrue(conf_data.requirements.find('Django<1.7') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8') > -1)
self.assertTrue(conf_data.requirements.find('djangocms-text-ckeditor') > -1)
Expand All @@ -257,14 +257,14 @@ def test_requirements(self):
'-q',
'--db=postgres://user:pwd@host/dbname',
'--i18n=no',
'--cms-version=rc',
'--cms-version=develop',
'--django-version=1.4',
'-f',
'--reversion=yes',
'-p'+self.project_dir,
'example_prj'])

self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_RC) > -1)
self.assertTrue(conf_data.requirements.find(config.data.DJANGOCMS_DEVELOP) > -1)
self.assertTrue(conf_data.requirements.find('Django<1.5') > -1)
self.assertTrue(conf_data.requirements.find('django-reversion>=1.8') > -1)

Expand Down
16 changes: 8 additions & 8 deletions tests/django.py
Expand Up @@ -25,7 +25,7 @@ def test_patch_16(self):
config_data = config.parse(['--db=sqlite://localhost/test.db',
'--lang=en',
'--django-version=1.6',
'--cms-version=develop',
'--cms-version=3.0',
'-q', '-u', '-zno', '--i18n=no',
'-p'+self.project_dir, 'example_path_16'])

Expand Down Expand Up @@ -78,7 +78,7 @@ def test_patch_24_standard(self):
config_data = config.parse(['--db=sqlite://localhost/test.db',
'--lang=en',
'--django-version=1.5',
'--cms-version=stable',
'--cms-version=2.4',
'-q', '-u', '-zno', '--i18n=no',
'-p'+self.project_dir, 'example_path_24_s'])

Expand Down Expand Up @@ -123,7 +123,7 @@ def test_patch_24_filer(self):
config_data = config.parse(['--db=sqlite://localhost/test.db',
'--lang=en',
'--django-version=1.5',
'--cms-version=stable',
'--cms-version=2.4',
'-f', '-q', '-u', '-zno', '--i18n=no',
'-p'+self.project_dir, 'example_path_24_f'])

Expand Down Expand Up @@ -166,7 +166,7 @@ def test_patch(self):
config_data = config.parse(['--db=sqlite://localhost/test.db',
'--lang=en',
'--django-version=1.5',
'--cms-version=develop',
'--cms-version=3.0',
'-f', '-q', '-u', '-zno', '--i18n=no',
'-p'+self.project_dir, 'example_path'])
install.requirements(config_data.requirements)
Expand Down Expand Up @@ -229,10 +229,10 @@ def test_patch(self):
del(sys.modules["%s.settings" % config_data.project_name])

@unittest.skip("Currently unsupported test")
def test_setup_database_filer(self):
def test_database_setup_filer(self):
config_data = config.parse(['--db=sqlite://localhost/test.db',
'-f', '-q', '-u',
'--cms-version=rc',
'--cms-version=3.0',
'-p'+self.project_dir, 'cms_project'])
install.requirements(config_data.requirements)
django.create_project(config_data)
Expand All @@ -252,9 +252,9 @@ def test_setup_database_filer(self):
query = project_db.execute('SELECT * FROM cms_page')
self.assertTrue(query)

def test_setup_database(self):
def test_database_setup(self):
config_data = config.parse(['--db=sqlite://localhost/test.db',
'-q', '-u', '--cms-version=rc',
'-q', '-u', '--cms-version=3.0',
'-p'+self.project_dir, 'cms_project'])
install.requirements(config_data.requirements)
django.create_project(config_data)
Expand Down

0 comments on commit bc8099a

Please sign in to comment.