User Login with Flask_Login - Flask Fridays #22
John Elder
@johnelderaiAbout
AI is taking over the world...let's get into it! OpenClaw, Claude Code, Manus, Perplexity, and whatever other weird AI stuff that comes along with a pinch of Python Programming thrown in from time to time. Check out my website JohnElder.AI and Codemy.com for more videos!
Latest Posts
Video Description
In this video I'll show you how to set up user Login with Flask_Login and Python. We'll start out adding a Username field to our Users Table. After we migrate the database, we'll update the web forms to handle username. Then we'll install and set up Flask_login that will handle logging in, logging out, sessions, and all the good things. We'll also create a user dashboard that will only appear if a user is logged in. #flask #codemy #JohnElder Timecodes 0:00 - Introduction 1:17 - pip install flask_login 2:50 - import flask_login to app 3:17 - Add UserMixin to User Model 3:48 - Add Username To Users Model 4:33 - Make DB Migration 5:03 - Add Username Field UserForm 5:32 - Add Username Field Add_User View 6:21 - Add Username Field To Web Form 7:12 - Add Username To Webpage 8:00 - Create Login.html Template 9:11 - Create Dashboard.html Template 9:46 - Create Login Route and View 10:36 - Create Dashboard Route and View 11:02 - Create LoginForm 12:10 - Add Login Link To Navbar 13:06 - Add Flask_login Configuration 13:57 - @login_manager.user_loader 15:03 - Make Dashboard @Login_required 15:42 - Validate Login Form 17:00 - Check Password Hash 18:51 - Show Flash Messages 19:54 - Test It Out! 20:33 - Create Logout Functionality 21:54 - Add Logout Link To Dashboard 22:26 - Conclusion
You May Also Like
Essential Flask Web Dev Tools
AI-recommended products based on this video

Freenove Ultimate Starter Kit for BBC micro bit (V2 Included), 316-Page Detailed Tutorial, 225 Items, 44 Projects, Blocks and Python Code

Dash Cam Front and Rear Camera – 4K+1080P Dual Dash Camera for Cars with 64GB SD Card, 5G/2.4GHz WiFi & App Control, Night Vision, Parking Mode, G-Sensor, Loop Recording, WDR, 170° Wide Angle

DELLFY Dash Cam, Dash Cam Front and Rear with App Control, 4K UHD Front Camera+2K Rear Cameras, Front 170°+Rear 160°, Night Vision, Dash Camera for Cars with 3.0" IPS Screen, 32GB Card



















