Skip to main content

Adds Bootstrap 4 components as plugins.

Project description

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.7 or higher

  • Django Text CKEditor 3.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:

django CMS Bootstrap 4 does not add the styles or javascript files to your frontend, these need to be added at your discretion.

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 be aware that this package does not support djangocms-text-ckeditor’s Drag & Drop Images so be sure to set TEXT_SAVE_IMAGE_FUNCTION = None.

Running Tests

You can run tests by executing:

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

To run the frontend make sure to use node 10.x.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangocms-bootstrap4-2.0.0.tar.gz (117.1 kB view details)

Uploaded Source

Built Distribution

djangocms_bootstrap4-2.0.0-py3-none-any.whl (181.0 kB view details)

Uploaded Python 3

File details

Details for the file djangocms-bootstrap4-2.0.0.tar.gz.

File metadata

  • Download URL: djangocms-bootstrap4-2.0.0.tar.gz
  • Upload date:
  • Size: 117.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for djangocms-bootstrap4-2.0.0.tar.gz
Algorithm Hash digest
SHA256 9e08c16f7e04e09e65f1d3eea3c13e41c27b5ea04418eecc41e1a1cea92f3388
MD5 78e4a45067991d07fc8a9d9fdb7fca90
BLAKE2b-256 f0b01df12030642ee994f7aac7110ac342c09b4efb8deab23519d15caf44706c

See more details on using hashes here.

Provenance

File details

Details for the file djangocms_bootstrap4-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: djangocms_bootstrap4-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 181.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for djangocms_bootstrap4-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 34848c8e16d4e6c2d9011ef99c7ac3c1e0bbbf3fedca9136d8716f0094ec869f
MD5 b92ada85550a8b8e30f57bc166d80bbb
BLAKE2b-256 26f10d3450935e33373cb7790ab162fce17cb6614b790cdd4518cbaf37ac8c97

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page