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

Uploaded Source

Built Distribution

django_bootstrap5-22.1-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for django-bootstrap5-22.1.tar.gz
Algorithm Hash digest
SHA256 70b51f020ef95a64780a0b5d5fdb1fade6e7b5e26c53355cc4f3648eca239cab
MD5 91a5565042c373256b45e9bbdc0f69a2
BLAKE2b-256 3b61a35f5a1b9d13f189500690baed0f271c8cc10e8ad98f1cfc878d3fa940cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_bootstrap5-22.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cf3f257abf750f19e47eddc106066ddb182576185494965d1408eddcb3a7380b
MD5 7940f541f0976a5f822a0297188d3406
BLAKE2b-256 05774243bc7553c883e1ab1f9ce67a19130cf78a6a8211a763fb80aa7c2d9076

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