Questions tagged [flask-bootstrap]
100 questions
25
votes
2 answers
populate WTForms select field using value selected from previous field
New to this, trying to build an app following a well known Flask tutorial, using Flask-bootstrap, Flask-wtforms, Jinja etc
I have a form with 2 select fields and a button.
class Form(FlaskForm):
school_year = SelectField('School year',…

fkaralis
- 445
- 1
- 6
- 10
18
votes
1 answer
How can I use Bootstrap 4 while using Flask for Python 3?
I have checked and found that Flask-Bootstrap natively uses Bootstrap 3.3.7 when you install it by default. But actually I wanted to use Bootstrap 4+ for my project by using Flask-Bootstrap package, any help would be much appreciated of how to…

faruk13
- 1,276
- 1
- 16
- 23
14
votes
2 answers
Pre-Populate an edit form with WTForms and Flask
I am able to add a new entry to my database using WTForms and Flask and I can edit too, the problem is that I need to display the already existing information in the database in an edit form.
I have the following code:
A Class For the Edit Post…

Eric
- 368
- 1
- 7
- 19
12
votes
3 answers
Bootstrap with Flask
I am looking to integrate a bootstrap template into my flask program. Specifically: I downloaded the zip file for this template:
https://startbootstrap.com/template-overviews/sb-admin/
However, the file is in a completely different format from the…

Jay Ocean
- 273
- 1
- 3
- 14
10
votes
4 answers
jinja2.exceptions.TemplateNotFound: bootstrap/base.html
I'm inheriting bootstrap/base.html in a Flask application after installing the Bootstrap Flask extension but having the below error:
jinja2.exceptions.TemplateNotFound: bootstrap/base.html

Ameida
- 153
- 1
- 1
- 9
8
votes
2 answers
How Flask-Bootstrap works?
I'm learning Flask web development, and the tutorial I'm following introduces an extension called Flask-Bootstrap. To use this extension, you must initialize it first, like this:
from flask_bootstrap import Bootstrap
# ...
bootstrap =…

nalzok
- 14,965
- 21
- 72
- 139
6
votes
3 answers
Flask-Talisman breaks Flask-Bootstrap
I want my website to always redirect to the secure https version of the site, and I'm using flask-talisman to do this. However for some reason adding this seemingly-unrelated line of code is breaking the flask-bootstrap formatting on my…

jon_simon
- 370
- 7
- 18
6
votes
1 answer
how to add class to label in quick_form flask bootstrap
Using quick_form Flask-Bootstrap to generate the form is very convenient for me, however, I could not find in their documentation a way that I can add extras class to label as required by my template theme.
My forms.py class look like this:
from…

Houy Narun
- 1,557
- 5
- 37
- 86
5
votes
2 answers
How to use Bootstrap 4 in Flask-Bootstrap?
The automatic supplied css file of Flask-bootstrap is like this:
It is version 3. Is there any way to use bootstrap4 in flask-bootstrap?…

Bicheng
- 687
- 8
- 20
5
votes
4 answers
WTForms: Disable client-side validation on cancel
What I'm asking for is actually quite simple. I want to create a form with some fields and a submit and a cancel button. I want to use the quick_form template function of Flask-Bootstrap to keep overhead in my template low. My form looks like…

MrLeeh
- 5,321
- 6
- 33
- 51
4
votes
1 answer
Flask - Form on Modal - How to display the field error on modal?
I am experimenting with flask and just creating some basic functionality to add data to a form displayed in a modal. While I have managed to get the form to display in the modal and save it from the modal, I am struggling to understand what needs to…

techbolt
- 103
- 8
4
votes
1 answer
flask-bootstrap with two forms in one page
I plan to put two forms in one page in my flask app, one to edit general user information and the other to reset password. The template looks like this
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block page_content %} …

nos
- 19,875
- 27
- 98
- 134
3
votes
1 answer
How to add css files to your Flask Application?
I have a flask application that runs fine but I want to add my own css files to make it more custom.
Here is my project structure
my_app
-app.py
static/
-style.css
templates/
-index.html
Here is my index.html:
{%…

Coder123
- 334
- 6
- 26
3
votes
0 answers
Conda fails to install flask-bootstrap
Conda refuses to carry out conda install flask-bootstrap. I have miniconda. Restarting my computer didn't help. I don't really know what else is pertinent but ill be around to respond if more info is needed. I don't know what else to say here bbut…

squirrels
- 303
- 1
- 11
3
votes
1 answer
Bootstrap templates auto-generated?
I'm having trouble setting up Flask-bootstrap. From the official documentation, it seems like all I have to do is apply the Bootstrap constructor to my app, and the templates will be automatically created. So I tried this:
from flask import…

ankush981
- 5,159
- 8
- 51
- 96