Repository: nephila/djangocms-installer
Pull request #323 (2018-02-01 00:53:38)

Add 3,5 final


Patch:
diff --git a/djangocms_installer/config/__init__.py b/djangocms_installer/config/__init__.py
index dc80396..ab66b6e 100644
--- a/djangocms_installer/config/__init__.py
+++ b/djangocms_installer/config/__init__.py
@@ -77,10 +77,10 @@ information.
                              'be used here. Example: en, fr-FR, it-IT')
     parser.add_argument('--django-version', dest='django_version', action='store',
                         choices=data.DJANGO_SUPPORTED,
-                        default='lts', help='Django version')
+                        default=data.DJANGO_DEFAULT, help='Django version')
     parser.add_argument('--cms-version', '-v', dest='cms_version', action='store',
                         choices=data.DJANGOCMS_SUPPORTED,
-                        default='lts', help='django CMS version')
+                        default=data.DJANGOCMS_DEFAULT, help='django CMS version')
     parser.add_argument('--parent-dir', '-p', dest='project_directory',
                         default='',
                         action='store', help='Optional project parent directory')
diff --git a/djangocms_installer/config/data.py b/djangocms_installer/config/data.py
index ba81b07..ecfb555 100644
--- a/djangocms_installer/config/data.py
+++ b/djangocms_installer/config/data.py
@@ -19,7 +19,7 @@ DJANGOCMS_RC = 'https://github.com/divio/django-cms/archive/develop.zip?{bust}'.
 )
 DJANGOCMS_BETA = DJANGOCMS_DEVELOP
 DJANGOCMS_34 = 'django-cms>=3.4,<3.5'
-DJANGOCMS_35 = DJANGOCMS_RC
+DJANGOCMS_35 = 'django-cms>=3.5,<3.6'
 
 if sys.version_info >= (3, 4):
     DJANGOCMS_SUPPORTED = ('3.4', '3.5', 'stable', 'lts', 'develop')
@@ -29,6 +29,7 @@ else:
     DJANGOCMS_SUPPORTED = ('3.4', '3.5', 'stable', 'lts', 'develop')
     DJANGOCMS_STABLE = '3.5'
     DJANGOCMS_LTS = '3.4'
+DJANGOCMS_DEFAULT = DJANGOCMS_STABLE
 
 DJANGO_DEVELOP = 'https://github.com/django/django/archive/master.zip?{bust}'.format(**bust)
 DJANGO_BETA = 'https://github.com/django/django/archive/master.zip?{bust}'.format(**bust)
@@ -40,6 +41,7 @@ else:
     DJANGO_SUPPORTED = ('1.8', '1.9', '1.10', '1.11', 'stable', 'lts')
     DJANGO_STABLE = '1.11'
     DJANGO_LTS = '1.11'
+DJANGO_DEFAULT = DJANGO_STABLE
 
 CMS_VERSION_MATRIX = {
     'stable': DJANGOCMS_STABLE,
diff --git a/docs/reference.rst b/docs/reference.rst
index def2bb9..8bbf9d6 100644
--- a/docs/reference.rst
+++ b/docs/reference.rst
@@ -38,9 +38,9 @@ The following arguments can be overridden in :ref:`wizard_mode`
   times, or as a comma separated list.
   Only language codes supported by Django can be used here;
   refer to `django source`_ for a list of supported codes.
-* ``--django-version``: Django version;  choices: ``1.8|1.9|1.10|1.11|stable|lts``, default: ``lts```
+* ``--django-version``: Django version;  choices: ``1.8|1.9|1.10|1.11|stable|lts``, default: ``stable```
 * ``--cms-version``, ``-v``: django CMS version, choices: ``3.4|3.5|stable|lts``.
-  default: ``lts``
+  default: ``stable``
 * ``--bootstrap``: Use Twitter Bootstrap as theme, choices: ``yes|no``, default: ``no``
 * ``--starting-page``: Load a starting page with examples (available for english language only)
   after installation, choices: ``yes|no``, default: ``no``
@@ -50,7 +50,7 @@ The following arguments can be overridden in :ref:`wizard_mode`
 .. note:: Django ``stable`` keyword is expanded to latest released Django version supported by django CMS
 .. note:: Django ``lts`` keyword is expanded to latest released Django LTS supported by django CMS
 .. note:: django-cms ``stable`` keyword is expanded to latest released django-cms version
-.. note:: django-cms ``lts`` keyword is expanded to latest released django-cms version
+.. note:: django-cms ``lts`` keyword is expanded to latest released django-cms LTS version
 .. warning:: if an unsupported combination of Django and django CMS version is selected, the
              wizard exits reporting the error.
 


Test patch:
diff --git a/tests/config.py b/tests/config.py
index f9dd44e..6f586a9 100644
--- a/tests/config.py
+++ b/tests/config.py
@@ -12,7 +12,7 @@ from tzlocal import get_localzone
 import six
 
 from djangocms_installer import config
-from djangocms_installer.config.data import CMS_VERSION_MATRIX, DJANGO_VERSION_MATRIX
+from djangocms_installer.config.data import CMS_VERSION_MATRIX, DJANGO_VERSION_MATRIX, DJANGO_DEFAULT, DJANGOCMS_DEFAULT
 from djangocms_installer.install import check_install
 from djangocms_installer.utils import less_than_version, supported_versions
 
@@ -26,7 +26,7 @@ class TestConfig(BaseTestClass):
 
         self.assertEqual(conf_data.project_name, 'example_prj')
 
-        self.assertEqual(conf_data.cms_version, '3.4')
+        self.assertEqual(conf_data.cms_version, '3.5')
         self.assertEqual(conf_data.django_version, '1.11')
         self.assertEqual(conf_data.i18n, 'yes')
         self.assertEqual(conf_data.reversion, 'yes')
@@ -731,10 +731,10 @@ class TestBaseConfig(unittest.TestCase):
     base_dir = os.path.dirname(os.path.dirname(__file__))
     config_dir = os.path.join(base_dir, 'tests/fixtures/configs')
     args = ['--config-file', '-s', '-q', 'example_prj']
-    django_version = DJANGO_VERSION_MATRIX['lts']
+    django_version = DJANGO_VERSION_MATRIX['stable']
     config_fixture = Namespace(**{
         'bootstrap': False,
-        'cms_version': CMS_VERSION_MATRIX['lts'],
+        'cms_version': CMS_VERSION_MATRIX['stable'],
         'db': 'sqlite://localhost/project.db',
         'django_version': django_version,
         'dump_reqs': False,
diff --git a/tests/fixtures/configs/config-01.ini b/tests/fixtures/configs/config-01.ini
index e7a4ef3..da70ba5 100644
--- a/tests/fixtures/configs/config-01.ini
+++ b/tests/fixtures/configs/config-01.ini
@@ -7,7 +7,7 @@ reversion = yes
 permissions = yes
 languages =
 django-version = lts
-cms-version = 3.4
+cms-version = 3.5
 parent-dir = .
 bootstrap = no
 templates = no