django CMS Bootstrap 4 is a plugin bundle for django CMS providing several components from the popular Bootstrap 4 framework.
Branch: master
Clone or download
FinalAngel Addon code alignments (#76)
* File cleanup

* applying isort

* Make sure DJANGOCMS_BOOTSTRAP4_CAROUSEL_DEFAULT_SIZE is used

* remove empty line

* update tox file

* fixed flake8
Latest commit 334d769 Jan 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.tx
djangocms_bootstrap4 Addon code alignments (#76) Jan 21, 2019
private Color style choices modifiable from settings Jul 11, 2018
tests Addon code alignments (#76) Jan 21, 2019
tools/tasks added frontend setup Sep 28, 2017
.coveragerc cleanup Sep 18, 2017
.editorconfig Remove drag & drop image support (#125) Jan 6, 2017
.eslintrc.js Fixed misconfiguration that provided jQuery in all modules Jan 9, 2018
.gitignore Addon code alignments (#76) Jan 21, 2019
.stylelintrc.js frontend setup Sep 22, 2017
.travis.yml Addon code alignments (#76) Jan 21, 2019
CHANGELOG.rst Addon code alignments (#76) Jan 21, 2019
LICENSE.txt cleanup Sep 18, 2017
MANIFEST.in updated release Oct 20, 2017
README.rst Addon code alignments (#76) Jan 21, 2019
addon.json Feature/cleanup (#30) Mar 9, 2018
aldryn_config.py Feature/cleanup (#30) Mar 9, 2018
browserslist getting frontend setup to work Sep 23, 2017
gulpfile.js Fixes (#20) Dec 21, 2017
package.json Feature/cleanup (#30) Mar 9, 2018
preview.gif Feature/cleanup (#30) Mar 9, 2018
setup.py Addon code alignments (#76) Jan 21, 2019
tox.ini Addon code alignments (#76) Jan 21, 2019

README.rst

django CMS Bootstrap 4

pypi build coverage

django CMS Bootstrap 4 is a plugin bundle for django CMS providing several components from the popular Bootstrap 4 library.

This addon is compatible with Divio Cloud and is also available on the django CMS Marketplace for easy installation.

preview.gif

Contributing

This is a an open-source project. We'll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our contribution guidelines.

We're grateful to all contributors who have helped create and maintain this package. Contributors are listed at the contributors section.

One of the easiest contributions you can make is helping to translate this addon on Transifex.

Documentation

See REQUIREMENTS in the setup.py file for additional dependencies:

python django djangocms

  • Django Filer 1.2.4 or higher
  • Django Text CKEditor 3.1.0 or higher
  • Django CMS Icon 1.0.0 or higher
  • Django CMS Link 2.1.0 or higher
  • Django CMS Picture 2.1.1 or higher

Make sure django Filer and django CMS Text CKEditor are installed and configured appropriately.

Installation

For a manual install:

  • run pip install djangocms-bootstrap4

  • add the following entries to your INSTALLED_APPS:

    'djangocms_icon',
    'djangocms_link',
    'djangocms_picture',
    'djangocms_bootstrap4',
    'djangocms_bootstrap4.contrib.bootstrap4_alerts',
    'djangocms_bootstrap4.contrib.bootstrap4_badge',
    'djangocms_bootstrap4.contrib.bootstrap4_card',
    'djangocms_bootstrap4.contrib.bootstrap4_carousel',
    'djangocms_bootstrap4.contrib.bootstrap4_collapse',
    'djangocms_bootstrap4.contrib.bootstrap4_content',
    'djangocms_bootstrap4.contrib.bootstrap4_grid',
    'djangocms_bootstrap4.contrib.bootstrap4_jumbotron',
    'djangocms_bootstrap4.contrib.bootstrap4_link',
    'djangocms_bootstrap4.contrib.bootstrap4_listgroup',
    'djangocms_bootstrap4.contrib.bootstrap4_media',
    'djangocms_bootstrap4.contrib.bootstrap4_picture',
    'djangocms_bootstrap4.contrib.bootstrap4_tabs',
    'djangocms_bootstrap4.contrib.bootstrap4_utilities',
    
  • run python manage.py migrate

Configuration

django CMS Bootstrap 4 utilises the following django CMS plugins:

It provides the following standard Bootstrap 4 components:

Settings

There are various settings possible on django CMS Bootstrap 4, to restrict them for now only the following can be changed:

DJANGOCMS_BOOTSTRAP4_TAG_CHOICES = ['div', 'section', 'article', 'header', 'footer', 'aside']

DJANGOCMS_BOOTSTRAP4_CAROUSEL_TEMPLATES = (
    ('default', _('Default')),
)

DJANGOCMS_BOOTSTRAP4_GRID_SIZE = 12
DJANGOCMS_BOOTSTRAP4_GRID_CONTAINERS = (
    ('container', _('Container')),
    ('container-fluid', _('Fluid container')),
)
DJANGOCMS_BOOTSTRAP4_GRID_COLUMN_CHOICES = (
    ('col', _('Column')),
    ('w-100', _('Break')),
    ('', _('Empty'))
)

DJANGOCMS_BOOTSTRAP4_USE_ICONS = True

DJANGOCMS_BOOTSTRAP4_TAB_TEMPLATES = (
    ('default', _('Default')),
)

DJANGOCMS_BOOTSTRAP4_SPACER_SIZES = (
    ('0', '* 0'),
    ('1', '* .25'),
    ('2', '* .5'),
    ('3', '* 1'),
    ('4', '* 1.5'),
    ('5', '* 3'),
)

DJANGOCMS_BOOTSTRAP4_CAROUSEL_ASPECT_RATIOS = (
    (16, 9),
)

DJANGOCMS_BOOTSTRAP4_COLOR_STYLE_CHOICES = (
    ('primary', _('Primary')),
    ('secondary', _('Secondary')),
    ('success', _('Success')),
    ('danger', _('Danger')),
    ('warning', _('Warning')),
    ('info', _('Info')),
    ('light', _('Light')),
    ('dark', _('Dark')),
    ('custom', _('Custom')),
)

Please see their code references for more details.

Running Tests

You can run tests by executing:

virtualenv env
source env/bin/activate
pip install -r tests/requirements.txt
python setup.py test