Using Flask-WTForms With Flask-Bootstrap


[ad_1]
https://i.ytimg.com/vi/S7ZLiUabaEo/hqdefault.jpg



I continue demonstrating Flask-Bootstrap by showing you how to integrate a form generated by WTForms in the template.

My videos on WTForms in Flask:
Intro – https://www.youtube.com/watch?v=eu0tg4vgFr4
Validators – https://www.youtube.com/watch?v=F9vTlDzn7ac
Date fields – https://www.youtube.com/watch?v=il9hh5Ysw9o

Get the code here: https://prettyprinted.com/l/t5y

Flask Bootstrap WTForms docs: https://pythonhosted.org/Flask-Bootstrap/forms.html

Join my free course on the basics of Flask-SQLAlchemy: https://prettyprinted.com/flasksql

Free Flask cheat sheet: http://prettyprinted.com/flaskcheatsheet

Original source


39 responses to “Using Flask-WTForms With Flask-Bootstrap”

  1. I have a question. I installed flask-bootstrap as you show us in the video but when i run the app, i got the message "no module flask_bootstrap". The flask module is working fine, i didn't have any problem with it. I work on raspberry pi3. Thanks!

  2. Thank you for the nice tutorial, i have 2 question, does flask bootstrap support bootstrap version 4.0, the second question is not related to the subject, can i build web apps with flask and react as a front end framework,

  3. Kinda took a dive in the deepend doing the flask website tutorial then trying to incorporate bootstrap, sass and wtf. Realised error of my ways so thanks for providing digestible chunks of flask to improve my understanding 🙂

  4. Until I started following your Flask tutorials, I have been having a lot of difficulty with other people's Flask Bootstrap tutorials. All the difficulties with Flask usually start with Bootstrap. You however seem to have all the answers. What a damn relief that is!
    I can't speak for other people but, I know I could use a bit more information (tutorials) on NavBars and other Bootstrap CSS, JS examples. Don't stop now! And I'm well aware that these video are more than a year old. But in this case, more is better.

    Thank You Anthony for your badly needed contribution.

  5. I rather use quickform sometimes, but I have an issue with it.I cannot submit the form correctly because when I add the submit input it finished out of the form tags and don't submit anything.Any help? :S

  6. I want to do a step by step questionaire in flask by using radio / checkboxes and text field in a multiple page form. Also want to use reference image in some of them. A tutorial in that effect would be nice.

  7. How do I pass data to the value attribute in the form through WTForms with Bootstrap so I could update posts?
    I tried this: {{ wtf.form_field(form.title, value="{{ post.title }}") }
    ……..but the value didn't interpret it as data from the database. Also how would I put a value inside the textarea?

  8. How to solve :jinja2.exceptions.UndefinedError UndefinedError: 'bootstrap_is_hidden_field' is undefined

    This "bootstrap_is_hidden_field" is present in the code of wtf.html…I guess some changes have to be made there

Leave a Reply