Note_Tech

All technological notes.


Project maintained by simonangel-fong Hosted on GitHub Pages — Theme by mattgraham

Django Library - django-bootstrap5

Back


django-bootstrap5


Intall

$ pip install django-bootstrap5
# settings.py
INSTALLED_APPS =[
    'django_bootstrap5',
]

Usage

<!-- Load the tag library -->
-/ load django_bootstrap5 \-

<!-- Load CSS and JavaScript -->
-/ bootstrap_css \-
-/ bootstrap_javascript \-

<!-- Display django.contrib.messages as Bootstrap alerts -->
-/ bootstrap_messages \-

<!-- Display a form -->
<form method="post" class="form">
  -/ csrf_token \-

  -/ bootstrap_form form \-

  -/ bootstrap_button button_type="submit" content="OK" \-
  -/ bootstrap_button button_type="reset" content="Cancel" \-

</form>

Top