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-23.1.tar.gz (102.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django-bootstrap5-23.1.tar.gz
Algorithm Hash digest
SHA256 3a3748b1ce1a2a73c2eca851c2926e7b6e5a317815e4da7ced6b1807c4792b1a
MD5 7808f9053abf6951bcfb476fe80ca0f6
BLAKE2b-256 c5281cc009670ad78eb88f496c622bf4aebbaedc08ecea802e1e66277dd1fc00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_bootstrap5-23.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d0b1997528b8a557968cf1ac7ff4c68659897779011a5a42816fb1ad9e57d6ae
MD5 4c31a82f1b84e8175200f6bb70b27e9b
BLAKE2b-256 fbb7cfab98dedee16d2b67d5b68e903b4e35be34baa81f68c6bf3cf9777fd19a

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