Skip to content

Commit

Permalink
Merge pull request #323 from nephila/feature/3_5_final
Browse files Browse the repository at this point in the history
Add 3,5 final
  • Loading branch information
yakky committed Feb 1, 2018
2 parents ed976a3 + e922857 commit cbb28b0
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions djangocms_installer/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ def parse(args):
'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')
Expand Down
4 changes: 3 additions & 1 deletion djangocms_installer/config/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
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')
Expand All @@ -29,6 +29,7 @@
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)
Expand All @@ -40,6 +41,7 @@
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,
Expand Down
6 changes: 3 additions & 3 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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``
Expand All @@ -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.

Expand Down
8 changes: 4 additions & 4 deletions tests/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
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

Expand All @@ -26,7 +26,7 @@ def test_default_config(self):

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')
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/configs/config-01.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cbb28b0

Please sign in to comment.