Skip to main content

Adds Bootstrap 4 components as plugins.

Project description

pypi coverage

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

preview.gif

Contribute to this project and win rewards

Because this is a an open-source project, we welcome everyone to get involved in the project and receive a reward for their contribution. Become part of a fantastic community and help us make django CMS the best CMS in the world.

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.

The project makes use of git pre-commit hooks to maintain code quality. Please follow the installation steps to get pre-commit setup in your development environment.

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

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

The Code plugin uses the ace code editor which is loaded from a CDN by default. If you want the ace code editor to be served from static files, please use djangocms-bootstrap4[static-ace] instead of djangocms-bootstrap4 in your requirements or with pip. Make the static files fore the ace code editor available to your project by adding djangocms_static_ace to your project’s INSTALLED_APPS.

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 = (
    (_('Default'), (
        ('container', _('Container')),
        ('container-fluid', _('Fluid container')),
    )),
    (_('Custom'), (
        ('container-yours', _('Your 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/djNN_cmsNN.txt # where NN is an available appropriate version
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-3.1.1.tar.gz (118.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djangocms_bootstrap4-3.1.1-py3-none-any.whl (182.2 kB view details)

Uploaded Python 3

File details

Details for the file djangocms_bootstrap4-3.1.1.tar.gz.

File metadata

  • Download URL: djangocms_bootstrap4-3.1.1.tar.gz
  • Upload date:
  • Size: 118.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for djangocms_bootstrap4-3.1.1.tar.gz
Algorithm Hash digest
SHA256 000ef30ff8bff4d6007237bcfaff3a1f71fb286ffd725f19b0e056332468819c
MD5 ee7b2fba238bf531287fda6bcf92fc90
BLAKE2b-256 d666a68dbf65d0e5ce77982c3c339816d31efca95380e101d42b72fca8dc0c78

See more details on using hashes here.

Provenance

The following attestation bundles were made for djangocms_bootstrap4-3.1.1.tar.gz:

Publisher: publish-to-live-pypi.yml on django-cms/djangocms-bootstrap4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for djangocms_bootstrap4-3.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d4d5a8e1ae533442092cbfba6a68c7ccf46a3145173eb3b808e01a0dc051905
MD5 55ad4e6f6e7755a223497a3c0d22b1c5
BLAKE2b-256 523da26bc36ab94f703f5b9705d6de79bed4726b4c54225d86af7bb11b6c89f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for djangocms_bootstrap4-3.1.1-py3-none-any.whl:

Publisher: publish-to-live-pypi.yml on django-cms/djangocms-bootstrap4

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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