Skip to main content

Bootstrap 5 for Django

Project description

django-bootstrap5

CI Coverage Status Latest PyPI version Any color you like

Bootstrap 5 for Django.

Goal

The goal of this project is to seamlessly blend Django and Bootstrap 5.

Status

Ready for production. Issues and pull requests welcome, see CONTRIBUTING.md.

Requirements

Python 3.7 or newer with Django 3.2 or newer.

Documentation

The full documentation is at https://django-bootstrap5.readthedocs.io/

Installation

  1. Install using pip:

    pip install django-bootstrap5
    
  2. Add to INSTALLED_APPS in your settings.py:

    INSTALLED_APPS = (
        # ...
        "django_bootstrap5",
        # ...
    )
    
  3. In your templates, load the django_bootstrap5 library and use the bootstrap_* tags. See example below.

Example template

{% load django_bootstrap5 %}

<form action="/url/to/submit/" method="post" class="form">
    {% csrf_token %}

    {% bootstrap_form form %}

    {% bootstrap_button button_type="submit" content="OK" %}
    {% bootstrap_button button_type="reset" content="Cancel" %}
</form>

Example app

An example app is provided in the folder example. You can run it with python manage.py runserver.

cd example
python manage.py runserver

Bugs and suggestions

If you have found a bug or if you have a request for additional functionality, please use the issue tracker on GitHub.

https://github.com/zostera/django-bootstrap5/issues

License

You can use this under BSD-3-Clause. See LICENSE file for details.

Author

Developed and maintained by Zostera.

Original author: Dylan Verheul.

Thanks to everybody that has contributed pull requests, ideas, issues, comments and kind words.

Please see AUTHORS for a list of contributors.

Project details


Download files

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

Source Distribution

django-bootstrap5-22.2.tar.gz (78.9 kB view details)

Uploaded Source

Built Distribution

django_bootstrap5-22.2-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file django-bootstrap5-22.2.tar.gz.

File metadata

  • Download URL: django-bootstrap5-22.2.tar.gz
  • Upload date:
  • Size: 78.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for django-bootstrap5-22.2.tar.gz
Algorithm Hash digest
SHA256 e944f5ced342e0e16cde77e1ddacb4b9fd5bce4cc190df2f7da0b8e18a24c9cb
MD5 8cd49b3854453371b7d693c3a7e921f3
BLAKE2b-256 5c6528852aa87ce4a96377b4bda99c644cb0761f2ad264a12be4cb450bcdf529

See more details on using hashes here.

File details

Details for the file django_bootstrap5-22.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_bootstrap5-22.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5d677bbfb94207c1a034d63a5f39d95ce287ef509e0b31dfb4d233cc81f93bcc
MD5 b65463bec060c765608269cc97362427
BLAKE2b-256 4811922e10876262ab6b14091f8da1b64d2fb6c18510d9c3b74047ad85eaf4e0

See more details on using hashes here.

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