Using Flask-WTForms With Flask-Bootstrap

  Рет қаралды 62,566

Pretty Printed

Pretty Printed

Күн бұрын

Пікірлер: 73
@prettyprinted
@prettyprinted 4 жыл бұрын
Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql
@fzhcary
@fzhcary 6 жыл бұрын
This is exactly what I need. Help me a lot on get started on flask with bootstrap without going too deep into front end development. Thank you so much!!!
@prettyprinted
@prettyprinted 6 жыл бұрын
You're welcome! Thanks for watching.
@divusiulius7539
@divusiulius7539 6 жыл бұрын
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.
@prettyprinted
@prettyprinted 6 жыл бұрын
I'm glad you like the video. I definitely want to cover Bootstrap more. I'm thinking when they update the library to support Bootstrap 4 I'll make more videos.
@divusiulius7539
@divusiulius7539 6 жыл бұрын
Are there any known conflicts or issues between Flask and Bootstrap that you may know about? I was trying to get the basic Navbar working. No luck! All that would show on the web-page was the title of the navbar and nothing else. I messaged the guy that offered the tutorial as well as other tutorials using the same CDN bootstrap, and none of them ever get back to me. Your tutorial was the only one that got real results.
@prettyprinted
@prettyprinted 6 жыл бұрын
There shouldn't be any conflicts between Flask and Bootstrap. I can only help though if you tell me specifically what's going wrong.
@jakovkusic4219
@jakovkusic4219 7 жыл бұрын
These videos are so good that they should be part of official Flask documentation.
@prettyprinted
@prettyprinted 7 жыл бұрын
Thanks for watching!
@gurucode.studio
@gurucode.studio 7 жыл бұрын
The best Flasker on KZbin , enjoyed the video as always , thanks :)
@dmays67
@dmays67 5 жыл бұрын
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 :)
@bootupgeek146
@bootupgeek146 6 жыл бұрын
Thanks a lot sir for this amazing video. You just made my work so much easier. I didn't know that library like this existed.
@prettyprinted
@prettyprinted 6 жыл бұрын
You're welcome! Thanks for watching.
@karangujrati679
@karangujrati679 5 жыл бұрын
Yes, I would love to watch the same type of video for a complicated example. It will clear my concepts better! Thanks!
@prettyprinted
@prettyprinted 5 жыл бұрын
I'll see what I can do.
@mileshill4804
@mileshill4804 7 жыл бұрын
Great videos on Flask. Keep them coming!
@prettyprinted
@prettyprinted 7 жыл бұрын
I will! Thanks for watching.
@Bigboned85
@Bigboned85 7 жыл бұрын
I'd be interested in seeing how you would do something similar with straight bootstrap. Very useful to know how wtforms integrates with bootstrap-like libraries. Plus reduces dependencies 😊
@prettyprinted
@prettyprinted 7 жыл бұрын
It would be like my original videos on WTForms, but instead of using plain inputs, you'd use inputs with the Bootstrap classes.
@dannycorganrg1
@dannycorganrg1 5 жыл бұрын
Anthony, Love your tutorials, they are the best!!! (now I've flattered you ...) any chance you could do a demo using the bootstrap4 html5 for a concertina form, I'm lost with that one. Danny
@rushey_1771
@rushey_1771 4 жыл бұрын
Thanks..This is what i needed..😊pls do more videos about this😍
@DutchRider
@DutchRider 4 жыл бұрын
props on this mate! this makes life much easier for me :)
@Juniorduke1
@Juniorduke1 4 жыл бұрын
Love your vide keep it up bro
@baxiry.
@baxiry. 7 жыл бұрын
thank you Anthony
@prettyprinted
@prettyprinted 7 жыл бұрын
You're welcome! Thanks for watching.
@mirham3802
@mirham3802 4 жыл бұрын
Hi Anthony, Best vids ever! How Can we use bootstrap 4? And why do I get the HTML5 validation instead or wtf.validators?
@morganprott5696
@morganprott5696 4 жыл бұрын
Great video! I am using the wtf.forms but also want to add css styling to the form. How would i go about integrating css styling into a wtf form?
@prabhatmohanty1164
@prabhatmohanty1164 7 жыл бұрын
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.
@xxgameplaysxx5891
@xxgameplaysxx5891 4 жыл бұрын
Nice video! Why do you only have1 button there? Since wtf.quick_form(form) automatically generate 1 button and your line 13 create a new one then there should be 2 buttons right?
@vic_shine
@vic_shine 7 жыл бұрын
Thx a lot! Any plans for create lessons 'bout Flask-Babel extension? ;)
@prettyprinted
@prettyprinted 7 жыл бұрын
Flask-Babel is on the list of videos to make.
@teamalt2herbals580
@teamalt2herbals580 7 жыл бұрын
Can we do a demo of an example of Multipart Form in WTF?
@sisyphus_619
@sisyphus_619 7 жыл бұрын
awesome. let's get more advanced.
@prettyprinted
@prettyprinted 7 жыл бұрын
Any suggestions?
@chinmayeejoshi4592
@chinmayeejoshi4592 7 жыл бұрын
A more involved example with something like Google maps maybe?
@musabomariyeh128
@musabomariyeh128 4 жыл бұрын
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,
@jasper5016
@jasper5016 6 жыл бұрын
Please cover more complicated forms.
@prettyprinted
@prettyprinted 6 жыл бұрын
Will do!
@alexsony1997
@alexsony1997 4 жыл бұрын
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!
@ISCSchool
@ISCSchool 7 жыл бұрын
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
@ISCSchool
@ISCSchool 7 жыл бұрын
Well, I did it. "from wtforms import SubmitField" and then add this to the class form, now the submit button Works fine.:)
@prettyprinted
@prettyprinted 7 жыл бұрын
Glad you figured it out.
@wilhelmwilhelm1251
@wilhelmwilhelm1251 6 жыл бұрын
Thanks :)
@patrickwilliams3320
@patrickwilliams3320 4 жыл бұрын
does Flask nav integrate with flask bootstrap?
@naheliegend5222
@naheliegend5222 3 жыл бұрын
what is that bootstrap/wtf.html? what does it do and where is it stored?
@AlessandroSabellico
@AlessandroSabellico 7 жыл бұрын
I couldn't set the default value for a SelectField nor for a SelectMultipleField using the "default=key/[keys]" field argument (even with static content!).. has something changed with new wtforms versions?
@prettyprinted
@prettyprinted 7 жыл бұрын
No, there should be no change. If you want, you can send your code to anthony@prettyprinted.com I can take a look.
@dannycorganrg1
@dannycorganrg1 5 жыл бұрын
i'm getting an error TemplateNotFound: bootstrap/base.html, but the code is as yours, as far as i can tell, any ideas
@mirzaumair1777
@mirzaumair1777 4 жыл бұрын
it is showing me errors in black color. how to change its error color.
@llamasarus1
@llamasarus1 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?
@prettyprinted
@prettyprinted 7 жыл бұрын
Try this: stackoverflow.com/questions/5117479/wtforms-how-to-prepopulate-a-textarea-field If it doesn't work for you, I can try it later and give you the answer.
@brandonemmanuelcardenasgar9307
@brandonemmanuelcardenasgar9307 6 жыл бұрын
how can I set up a background image?
@prettyprinted
@prettyprinted 6 жыл бұрын
That's just regular HTML.
@brandonemmanuelcardenasgar9307
@brandonemmanuelcardenasgar9307 6 жыл бұрын
I am trying but I get GET /img.jpg HTTP/1.1" 404 what i am doing on index.html is {% block content %} {{form.csrf_token }} {{wtf.form_field(form.nombre_form) }} {{wtf.form_field(form.dia_nac_form)}} {{wtf.form_field(form.mes_nac_form)}} {{wtf.form_field(form.dia_ent_form)}} {{wtf.form_field(form.mes_ent_form)}} {% endblock%}
@prettyprinted
@prettyprinted 6 жыл бұрын
You have to use the static keyword and place the image in your static directory. Here's an example: flask.pocoo.org/docs/1.0/tutorial/static/
@SuperGari2
@SuperGari2 6 жыл бұрын
what does base.html looks like?
@prettyprinted
@prettyprinted 6 жыл бұрын
You can download the code from the link in the description.
@divamlehri9850
@divamlehri9850 7 жыл бұрын
On running the program it shows error "templateNotFound: bootstrap/wtf.html" How to resolve this error?
@prettyprinted
@prettyprinted 7 жыл бұрын
Have you installed Flask-Bootstrap? pip install flask-bootstrap
@divamlehri9850
@divamlehri9850 7 жыл бұрын
Thanks.....solved !! Can you please tell how to integrate any other downloaded bootstrap theme with the program
@prettyprinted
@prettyprinted 7 жыл бұрын
It's basically just putting the code into the correct blocks. You'll have to do some conversion for each template to fit the Flask-Bootstrap model. If you don't want to do that, you can leave the templates as they are, and simply load the CSS in the typical way.
@siddharth9933
@siddharth9933 5 жыл бұрын
Why do we use wtform validations if the same can be done by HTML itself ? This way the request does not go to server and it will be faster as well
@prettyprinted
@prettyprinted 5 жыл бұрын
The user can always modify the form before they send the data. So you do validation in the HTML for user experience and validation on the server for security.
@bhavingolakiya5224
@bhavingolakiya5224 6 жыл бұрын
ImportError: cannot import name Anyof give me solution for that please
@prettyprinted
@prettyprinted 6 жыл бұрын
AnyOf, not Anyof
@chrisspencer6502
@chrisspencer6502 4 жыл бұрын
one this this video leaves out but is very basic the templates are stored in venv >flask-bootstrap > templates
@dannycorganrg1
@dannycorganrg1 5 жыл бұрын
the link to the code is a 404 can you restore the code as I have an error I cant work out without doing a compare many thanks in advance
@prettyprinted
@prettyprinted 5 жыл бұрын
I've updated the link. github.com/PrettyPrinted/youtube_video_code/tree/master/2017/01/17/Using%20Flask-WTForms%20With%20Flask-Bootstrap
@divamlehri9850
@divamlehri9850 7 жыл бұрын
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
@prettyprinted
@prettyprinted 7 жыл бұрын
More code is needed for me to know. If you want, you can show me through email. anthony@prettyprinted.com
@NixBiks
@NixBiks 7 жыл бұрын
Was this ever answered? I get the same error
@taektiek526
@taektiek526 7 жыл бұрын
first
Using the Include Statement in Flask Templates
1:52
Pretty Printed
Рет қаралды 4,1 М.
Python and Flask - Web Forms with Flask-wtf
6:42
TheCodex
Рет қаралды 68 М.
Trapped by the Machine, Saved by Kind Strangers! #shorts
00:21
Fabiosa Best Lifehacks
Рет қаралды 35 МЛН
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 2,8 МЛН
Intro to Flask-Bootstrap
8:56
Pretty Printed
Рет қаралды 95 М.
Web Forms With WTF! - Flask Fridays #5
22:56
Codemy.com
Рет қаралды 70 М.
Уроки Bootstrap / Как сделать модальное окно, всплывающее окно на сайте
7:48
Изучаем мир ИТ / Олег Шпагин / Программирование
Рет қаралды 4,4 М.
Flask-WTF - Converting a Bootstrap Template (5 of 5)
20:29
Pretty Printed
Рет қаралды 16 М.
Python Flask Authentication Tutorial - Learn Flask Login
29:35
Arpan Neupane
Рет қаралды 232 М.
REST API With Flask & SQL Alchemy
35:25
Traversy Media
Рет қаралды 297 М.
Intro to Flask-Login
16:54
Pretty Printed
Рет қаралды 77 М.
Flask and MongoDB  w/ Flask-pymongo | Flask Forms using Flask WTF
13:35
Code With Prince
Рет қаралды 5 М.
Adding Bootstrap to our Flask App - Character Counter Web App
5:00
Coding Under Pressure
Рет қаралды 2,4 М.