Questions tagged [django-bootstrap4]
36 questions
7
votes
1 answer
What are the differences between django-bootstrap4 and bootstrap4?
I am beginner in Django web development & currently I am using using bootstrap4 by loading bootstrap.min.css & bootstrap.min.js as below in html files.

Moon
- 4,014
- 3
- 30
- 66
4
votes
6 answers
ModuleNotFoundError: No module named 'bootstrap4'
I installed bootstrap4 with
$ pip install django-bootstrap4
It is being installed in this directory
C:\Users\trade\techpit-match-env\Lib\site-packages
Django seems to be looking at this…

kenichiro
- 43
- 1
- 1
- 4
2
votes
1 answer
django_bootstrap5 not formatting anything
I'm trying to get basic bootstrap formatting working in a django app, and installed django_bootstrap5 to do so. No formatting, however, is getting applied to any of the pages.
Here's the various pages:
base.html:
{% load…

BLimitless
- 2,060
- 5
- 17
- 32
2
votes
1 answer
Bootstrap 4 nav-toggler button not work on mobile device
The following code works with chrome browser on laptop, but doesn't work with chrome (v74 & v84) on mobile device. when clicking the button on mobile device, no response.
Learning…

Vinson
- 21
- 1
2
votes
0 answers
Django - Initial form value from templates
i have one form and use it many times with a for loop in one template file. I want to set the values of the fields in my templates directly. I use Django-bootstrap4 and didn't now how to realize it.
I tried the template tags "bootstrap_form" and…
2
votes
1 answer
Django-Bootstrap4 Javascript, Jquery, CSS not working properly
I'm trying to use the django-boostrap4 in my project, so I did the following:
My home_base.html
{% load static %}
{% load bootstrap4 %}
{% block head %}

C. S. F. Junior
- 341
- 1
- 3
- 20
1
vote
2 answers
Django Crispy Form with Toggle switch element
I am using Crispy Forms and layout helper to generate my Input form. I'd like to add a Toggle switch into the form.
desired result:
what I get:
forms.py:
class RequestForm(forms.ModelForm):
on_prem =…

Craig P
- 477
- 6
- 12
1
vote
0 answers
django-bootstrap-modal-forms additional data in trigger
Using the following JQuery to trigger a modal:
$("#view-large").modalForm({
modalID: "#fullscreen",
formURL: "{% url 'view-fullscreen' ID %}"
});
The 'ID' i formURL is is what I'm missing. It's from a…

Heidar
- 11
- 1
1
vote
2 answers
My form does not save using bootstrap for styling in django
hello thank you for your visiting
I'm a new learner of Django
I would like to know how to style form using django-bootstrap-v5
i try this and does not work
i have this form.py
pathesForm = inlineformset_factory(
Book,
quotation,
…

ahmed belkhiri
- 15
- 6
1
vote
1 answer
How do I make the responsive navigation stack vertically on the small screen or landscape orientation on smartphones (using Bootstrap 4 alpha 2)?
Here is my CSS and HTML for that section:
@media (min-width:544px) {
.navbar-toggler {
float: right;
display: inline-block;
margin-top: 5px;
margin-bottom: 25px;
padding: 10px;
border: none;
}
.nav-responsive li {
…

Christy
- 11
- 3
1
vote
1 answer
Generate kwargs for Django bootstrap_field
I'm trying to auto generate a list of fields for a Django form with the bootstrap4 package.
I'm defining the kwargs in a dict, and want to loop through the fields and apply any kwargs to the bootstrap_field tag that comes with bootstrap4.
Data
data…

Brenden
- 8,264
- 14
- 48
- 78
1
vote
2 answers
datepicker Is not showing?
I am developing an application with Django and I need to choose date and time. I am trying to do it with 'bootstrap_datepicker_plus', but the calendar does not appear when I show the form.
settings.py
INSTALLED_APPS = [
'django.contrib.admin',
…

David De La Varga
- 21
- 6
1
vote
1 answer
Replace a char in django template before final rendering
I want to make all of my asterisks (*) in a template in red color in a Django Template. (E.g. in form labels that * symbol points the field is required. But when putting * in label of a form field it is rendered as black color as usual.
How can I…

Saleh
- 1,819
- 1
- 17
- 44
0
votes
1 answer
problems with djano-bootstra5. My server won't run
`I am working Python Crash Course and is making an learning_log app in Django. I have installed django-bootstrap5, but when I put the code in my bsettings.py:
INSTALLED_APPS = [
#My apps.
'learning_logs',
'accounts',
#third party…

Peter Knap
- 3
- 1
0
votes
0 answers
change in fonts and spacing in a django app
I installed django bootstrap5 but it seems to have messed up the css and fonts and i can't seem to figure out what went wrong..I have a website am trying to clone, innitially things looked pretty the same until i tried installing django bootstrap…

Daman
- 1
- 2