Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 update it or anything like that. Thanks

like image 401
faruk13 Avatar asked Jan 18 '19 16:01

faruk13


People also ask

Can you use Flask and bootstrap together?

You can install Flask's Bootstrap dependency with pip install flask-bootstrap in your terminal. However, using flask-bootstrap can limit the control you have over the styling and design of your website. It also has documentation here, and for the documentation specific to flask-bootstrap, go here.

What version of Bootstrap does Flask use?

Flask-Bootstrap 3.3. 7.1.

Should I use flask bootstrap?

There is a fork called Bootstrap-Flask that is up to date. That said, however, it is not a good idea to use either Flask-Bootstrap or Bootstrap-Flask. These are very thin packages with a small layer of indirection that primarily serve to obscure your understanding.


1 Answers

There is a fork called Bootstrap-Flask that is up to date.

That said, however, it is not a good idea to use either Flask-Bootstrap or Bootstrap-Flask. These are very thin packages with a small layer of indirection that primarily serve to obscure your understanding.

Instead, I recommend using the starter template provided by Bootstrap 4, which will always be up to date to whatever version you require using their CDN.

If you stick with Bootstrap, you will soon want to build your own Bootstrap anyways so you can do things like add custom themes. Hacking Bootstrap with CSS instead of using their SASS customization scheme is painful (I did it for a while). The build process is well documented and simple enough, just a few installations required.

like image 122
okovko Avatar answered Oct 08 '22 04:10

okovko