Welcome to another video! In this video, I’m going to show you how to create a website using python as fast as possible. We’ll be using the flask module which is a web framework for python. This will be a relativly simple and quick video so check the links below for more in depth videos.
💻 Thanks to Altium Designer for sponsoring this video. Checkout the best PCD design software on the market by signing up for a FREE trial here: https://www.altium.com/yt/techwithtim
📄 Resources 📄
Fix Pip (Windows): https://www.youtube.com/watch?v=AdUZArA-kZw&t=204s
Fix Pip (Mac): https://www.youtube.com/watch?v=E-WhAS6qzsU
Flask Tutorial Series: https://www.youtube.com/watch?v=mqhxxeeTbu0&t=46s
Flask Blog: https://www.youtube.com/watch?v=GQcM8wdduLI
Python Website Full Tutorial: https://www.youtube.com/watch?v=dam0GPOAvVI&t=1s
Flask REST API: https://www.youtube.com/watch?v=GMppyAPbLYk&t=769s
⭐️ Timestamps ⭐️
00:00 | Overview
01:53 | Environment Setup
02:39 | Flask Setup
04:28 | Creating Views/Routes
08:18 | Rendering HTML
09:45 | Template Variables
11:09 | URL Parameters
12:52 | Query Parameters
14:03 | Returning JSON
15:20 | Getting JSON Data
16:06 | Redirect
17:49 | Adding JavaScript
22:50 | Template Inheritance
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: https://tech-with-tim.teachable.com/p/the-fundamentals-of-programming-with-python
👕 Merchandise: https://teespring.com/stores/tech-with-tim-merch-shop
🔗 Social Medias 🔗
📸 Instagram: https://www.instagram.com/tech_with_tim
📱 Twitter: https://twitter.com/TechWithTimm
⭐ Discord: https://discord.gg/twt
📝 LinkedIn: https://www.linkedin.com/in/tim-ruscica-82631b179/
🌎 Website: https://techwithtim.net
📂 GitHub: https://github.com/techwithtim
🔊 Podcast: https://anchor.fm/tech-with-tim
🎬 My YouTube Gear 🎬
🎥 Main Camera (EOS Canon 90D): https://amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): https://amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): https://amzn.to/2Yuol5r
🕹 Tripod: https://amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): https://amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): https://amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): https://amzn.to/3oi0v8Z
☀️ Lights: https://amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): https://amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): https://amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): https://amzn.to/2B2IXcQ
📢 Speaker (Beats Pill): https://amzn.to/2XYc5ef
🎧 Headphones (Bose Quiet Comfort 35): https://amzn.to/2MWbl3e
🌞 Lamp (BenQ E-reading Lamp): https://amzn.to/3e0UCr8
🌞 Secondary Lamp (BenQ Screenbar Plus): https://amzn.to/30Dtafi
💻 Monitor (BenQ EX2780Q): https://amzn.to/2HsmUPZ
💻 Monitor (LG Ultrawide 34WN750): https://amzn.to/3dSD7tS
🎙 Mic Boom Arm (Rode PSA 1): https://amzn.to/30EZw9m
🎚 Audio Interface (Focusrite Scarlet 4i4): https://amzn.to/2TjXsih
💸 Donations 💸
💵 One-Time Donations: https://www.paypal.com/donate?hosted_button_id=CU9FV329ADNT8
💰 Patreon: https://www.patreon.com/techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
– Tech With Tim
– Python
– Website
– Flask
– JSON
– Altium
⭐️ Hashtags ⭐️
#TechWithTim #PythonWebsite
source
"from views import views " doesn't work, someone has an idea ? 🙂
This man outputs more programmers than his projects
How do i add an image to a website?
Tim sos el mejor, sos el Messi de la Matrix.
You got me confused maybe I should start with some simpler programs . I know a guy at church that wants me to make him a website . I know there are many different ways to make a website using python . I am bad at different libraries . I barely know the entire standard library . I need help from somebody . My main goal with programming was to make video games . Along the way I picked up some other stuff and came to the conclusion that I could become a freelance programmer . I am disabled and do not have to work now but if I ever want a wife and kids I have to get a job and a good paying job . I do not think I am going to get rich programming but it is a start . Another thing that makes learning hard for me is not only my disability but the fact that I picked up Lua , Java Script and GD Script . GD Script and Java Script were recommended to me . I know the guy personally that said I should learn Java Script . A guy on QUORA said that I should learn GD Script to make games in Godot . I watched a youtube video that said lots of games have been written in Lua so I did the research and it said particular parts of games have been written in Lua . I am confused as hell right now so somebody please help
Man said ill speak fast and had me put him on 1.5 afterwards 😀
So basically python web is a weird version of react….
Hey man, I have a quick question, when you put the "<h1>Home Page</h1>" in the <div> block of code, it shows " Home Page" (the text we wanted it to say) on the profile page. How could I make it appear on a different part of the web app (e.g, the home section)? Thanks for the fantastic tutorial, this one was the only one I could understand or get working! You've earned a new sub!
Also, how could I use this to make a new section on the web app with something like "@views.route("/Tkinter")" and use Tkinter for that part of the web app? Once again Thanks for the tutorial!
Great Video! Thanks Heaps, I am having trouble with url_prefix, how do I trouble shoot?
Can this be done only in PyCharm or this works only on VSCode?
i did not know you can use python to build a web site
better use javascript for website – and leave python to deal with with software part
0.75 playback speed is perfect for this lol. Thank you!
What is the name of IDE you are using?
This was outstanding, thanks!!
When I do this i am in Pycharm using the command line there. When I execute the command to run the file no response happens. Any idea what's going wrong?
so helpful, i learnt so much in 22 minutes and 22 seconds
dude can you please change your theme? i don't know why i cannot see this monokai theme
thank you for this video!
why my website become full blank of white after changing the return to render template("index.html") ???? can someone help me
I love this
5:10
Thank you very much man
when i write it dont show just giving me erour404 not found and the code is the same
thanks Tim very good lesson
can anyone please help explain to me why as soon as i try to run the code after minutes 3:50 , i got the ModuleNotFoundError: No module named 'flask'…….i already followed Tim initial tutorial to install the module & succesfully install it…yet still i got this message…same goes when i try to learn Kivy, eventhough it said succesfully installed, seems like the system didnt acknowledge that i have that module in my computer…PLEASE anyone that kind enough to explain what is should do……i'm using windows 10 & latest python version…3.10 if not mistaken…Thanks in advance
Bro you are genius!!
Do you have a tut on connecting pyttsx3 script with Flask (html frontend) ?
Very simple and easy to understand. Thanks for your sharing.
I just have to learn Python, so this is very helpful, Monsieur.
Thank you. Really useful and awesome..
4:03 mine does NOT show the same output in the Terminal. How did you get this output?
The flask app doesn't work on me. I use pycharm
html: press ! then press tab, done
Thanks for making this video
Really helped me out
I learned more in this 20 minute video than I usually do in a 4 hour video
First person I've come across who explained Flask like a normal human being. Been struggling with this for a while until I saw this video. Thanks man
Hey i have a problem with render template when i put render_template i just goes Blank And not Home Page can anyone help me?
Ehm, where's the website
I'm confused. This video just came in my recommendations. I thought when building a website you use html, css and JavaScript. What is the point in using python? What are the benefits? Is it worth learning it? etc etc
I personally didnt get Altium, but that ad inspired me to get a PCB designer
well it definitely runs but the html wont render
this did not at all work for me… flask is terrible imma wait for something new and better to come out.
awesome video Tim, thank you
Thank you, thank you, thank you, this is exactly what I was looking for and ironically enough I watched your video at 2X because I don't a lot of free time. That said, I am trying to get back into coding and need to get caught up and this will help. Again, thanks and God bless,
Hello tim, in literally the first step im getting a syntaxerror: invalid syntax for the reason File "<stfin>", line 1. What is it?
How is this possible you used python and html both or i think you only used python i am so confused.anyone reply
is there a way to learn python theories fast? i'm just an amateur that uses codeigniter with a little basic knowledge at php, but i wanna upgrade my skills so it can follows the requirements in developed countries.
What code editor is he using?
Thank you so much!
When i render the HTML my screen just removes everything , any solution to this problem?