In this video, I’m going to be showing you how to make a website with Python, covering Flask, authentication, databases, and more. The goal of this video is to give you what you need to make a finished product that you can tweak, and turn into anything you like. We’re going to also go over how you create a new user’s account, how you store those in a database, how to log into those user accounts, how to log out of them, and how you associate that information with a specific user.
🔥 Sign up for a FREE TypingDNA Developer Account!
Try the TypingDNA Demo:
📝 Code for this tutorial:
📺 Fix Pip on Windows:
📺 Fix Pip on Mac:
⭐️ Timestamps ⭐️
00:00:00 | Video Overview
00:01:50 | Project Demo
00:04:35 | Directory Structure
00:06:40 | Flask Setup & Installation
00:08:55 | Creating a Flask App
00:14:01 | Creating Routes/Views
00:21:50 | Jinja Templating Language & HTML Templates
00:47:22 | Sign Up Page HTML
00:52:14 | Login Page HTML
00:54:31 | HTTP Requests (POST, GET, etc.)
00:57:05 | Handling POST Requests
01:03:14 | Message Flashing
01:12:42 | Flask SQLAlchemy Setup
01:15:46 | Database Models
01:23:42 | Foreign Key Relationships
01:29:10 | Database Creation
01:34:14 | Creating New User Accounts
01:43:16 | Logging In Users
01:49:17 | Flask Login Module
01:56:03 | Checking if User is Logged In
01:58:54 | Notes HTML
02:02:41 | Adding User Notes
02:05:48 | Deleting User Notes
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python:
👕 Merchandise:
🔗 Social Medias 🔗
📸 Instagram:
📱 Twitter:
⭐ Discord:
📝 LinkedIn:
🌎 Website:
📂 GitHub:
🔊 Podcast:
🎬 My YouTube Gear 🎬
🎥 Main Camera (EOS Canon 90D):
🎥 Secondary Camera (Panasonic Lumix G7):
📹 Main Lens (EFS 24mm f/2.8):
🕹 Tripod:
🎤 Main Microphone (Rode NT1):
🎤 Secondary Microphone (Synco Wireless Lapel System):
🎤 Third Microphone (Rode NTG4+):
☀️ Lights:
⌨ Keyboard (Daskeyboard 4Q):
🖱 Mouse (Logitech MX Master):
📸 Webcam (Logitech 1080p Pro):
📢 Speaker (Beats Pill):
🎧 Headphones (Bose Quiet Comfort 35):
🌞 Lamp (BenQ E-reading Lamp):
🌞 Secondary Lamp (BenQ Screenbar Plus):
💻 Monitor (BenQ EX2780Q):
💻 Monitor (LG Ultrawide 34WN750):
🎙 Mic Boom Arm (Rode PSA 1):
🎚 Audio Interface (Focusrite Scarlet 4i4):
💸 Donations 💸
💵 One-Time Donations:
💰 Patreon:
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
– Build a website
– Python tutorial
– Flask
– Learn Python
– How to use Python
– HTTP requests
– HTML Python
– User accounts Python
⭐️ Hashtags ⭐️
#PythonWebsite #TechWithTim
Start a high paying tech career making $60k+/year with NO DEBT: https://coursecareers.com/a/techwithtim?course=software-dev-fundamentals
I keep getting an error when I try to test the error flashes at 1:11:00, namely that it gives me an error screen that correctly flags the errors the flashes would cover, but it instead shows that separate full debug error screen and just keeps saying I need a secret key when I already have one configured as per the tutorial. Not sure what the heck to do to fix it. 🙁
1:38:36 'sha256' password method has been removed in Werkzeug 3.0, use 'scrypt' instead
I am getting a ValueError: Invalid hash method 'sha256' …. what do I do….
what if i receive an error when try to install flask?
To those who have problem with sha256 just use these methods (bcrypt, scrypt, pbkdf2:sha512, pbkdf2:sha256, argon2) if you don't define the method the default value is "pbkdf2:sha256", and the sha256 and 512 if they don't work it means they're either deprecated or not supported anymore, another thing to note is that if u have problem with check_password_hash, just check the name of your input tag to make sure it matches with what you're getting in your login func
2h for nothing u dumpp
best tutorial on this topic, thanks bro
NOTE at 1:31:00 there is no neeed for the create_databse function. SQLAlchemny will already not overwrite existing files and the only time the db wouldnt be created is if there is an error.
To fix the code use
with app.app_context():
db.create_all()
The whole app=app thing will certainly throw an error
How i can rerun server? I need to run aggain debugger?
Hi Tim,
I just wanted to say thank you for the informative tutorial. I appreciate you taking the time to create such a helpful resource.
❤❤
Im new to coding so lot of this stuff went over my head, but wow really enjoyed this tutorial! Much respect.
The words can't describe how much I appreciate you Tim for this wonderful tutorial, thank you so much 🤍🤍🤍🤍🤍🤍
Is anyone else running into this error when testing the Sign Up page?
TypeError: 'first_name' is an invalid keyword argument for User
for some reason when i sign up i get "ValueError: Invalid hash method 'sha256'." this message can someone help me with that?
Thank you very much Tim, your teaching has been superb. I have never seen such a clear and complete exposition. Thanks forever Tim.
This has been useful for my major project at school 🙂
Django is not more powerful in my opinion. It has more features yes, but I have all i need in flask+plug-ins.
Excellent vieeo
without using javascript
This is a Great tutorial, learnt many concepts about web dev.
Can you plz make a similar tutorial for FastAPI!!?
Hi.
Please please please make an updated video on this one 🙏
Wilson Susan Miller Matthew Young Michelle
1:33:25 'from . import models' will work
you are a great teacher but your subtitles suck master, I don't know why but your subtitles only have small words, I can't see the idea in macro meaning, I need longer sentences, it's impossible for those who try to learn English at the same time.
is it ok that iI completed the course and only understand about 30%
Can you use pandas instead of sqlalchemy just as a database or is it specifically sqlalchemy? Because I am having trouble using it on my pycharm mac m1.
i got so many errors 😂
Bro just write ! Tab
28:53
Can I connect this code with a react frontend code??!
is anyone getting this type of error?
AttributeError: 'NoneType' object has no attribute 'is_active'
Tim, thanks a lot for this simple yet beautiful tutorial. Hope to see more from you on courses about full-stack with Python/JavaScript.