Flask Tutorial #10 - Blueprints & Using Multiple Python Files

preview_player
Показать описание
This flask tutorial will cover how to use Blueprints in a flask application. A blueprint allows you to separate your app into different files and different components. This can be useful when you re trying to reuse certain parts of your flask app later on.

Text-Based Tutorial: Coming Soon...

◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python

◾◾◾◾◾◾

⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡


Tags:
- Tech With Tim
- Python Tutorials
-Flask python tutorial
- Python flask tutorial
- Python Flask Blueprints
- Blueprints Flask Tutorial
- Flask Blueprints

#Python #Flask
Рекомендации по теме
Комментарии
Автор

Hey Tim, i wanted to point out that when you use CSS as for blueprint you have to change href="{{url_for('static', filename='style.css')}} to href="{{url_for('second.static', filename='style.css')}} when referencing the CSS code. Thank you very much for your videos, i have learned a lot😀 from them

SoBasicCat
Автор

This is what we need more after referring docs Tim....wish you would do more videos on Flask like

kishoreandra
Автор

It's always interesting to see how number of viewers drop as we progress towards the end of pretty much all programming series out there. The law of statistics never disappoints.

kimeg
Автор

Hi Tim,
thanks for this great tutorial. I very much like the way you introduced us to flask.
One thing that may be helpful to others: For me, it did not work instantly for the blueprint to access the static folders, i.e. I had an issue both showing the image and loading the css file. Finally, I found I had to change the variable 'static' in the url_for argument to 'second.static' for everything to work...

davidfuchs
Автор

After i moved my folders and the second.py the styles.css and the image does not work anymore. Do you know why and how to fix it?

joplayfull
Автор

how can use mysqldb in these blueprints?? i can create the mysql connection on the main file, but i can't do it with the blueprints

igorcrissaff
Автор

You make the best python videos in the world! I recommend your channel for python learners. Thanks again!

svijayiitk
Автор

Dude can you do data structures implementation in python and take it to Advanced level? Or strech your artificial intelligence course to Advanced. Need em badly, i learned a lot lot from you

westernvibes
Автор

Thanks, nice content :) Hi from Turkiye!

Автор

No matter if I add the template_folder / static_folder, its gonna use the default ones. for ex., I said "template_folder="admin_templates", but when I entered localhost:5000/admin/, it rendered the index.html in the "templates" folder, not the one in "admin_templates".

helluci
Автор

You are the best because I was looking for what is init and why, how uses it 💪💪

TecnoTutosMarc
Автор

Thanks for explaining it so clearly! All the documentation I was reading kept talking about app factories; this is a much clearer way to explain the basics.

jeffjackson
Автор

This guy is definitely the best python youtuber

adesuamartins
Автор

Could you please do the same like creating multiple modules for flask_sqlalchemy....not able to find much helpful video

abhaykumar
Автор

After I moved the static and templates folder to the admin folder, the images and CSS files were not working. Could someone please explain?

KittichaiKerdsongsang
Автор

at 11:24 wouldn't our import statement be "from admin.template import second" ?

trakba
Автор

will i be able to get data from my db created in another file?

constantinewesterink
Автор

Hi Tim! Can you make a video about the software you use?

nomisotech
Автор

why the css file is not working in the home.html i made a image and a text with css code but i doesn't work and i don't know why is not working

anassfaiz
Автор

Hi! Can I use flask for big projects? (practice)

bhargavkhetmalis