Basic Admin Page - Flask Fridays #34

preview_player
Показать описание
In this video I'll show you how to create a super basic admin area for flask and python.

We'll create an admin page, set one of our users to be the admin, and then restrict access to that page to all other users.

We won't build out any admin functionality in this video, just the admin restrictions and page itself.

#flask #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:59 - Create Admin Function
2:45 - Add Admin Link To Navbar
3:33 - Only Show Page If Logged In
4:35 - Add User As Admin
6:27 - Hide Admin Link From Navbar
7:27 - Conclusion
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Flask Friday Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:
▶️ Get The Code

Codemycom
Автор

You are the Heisenberg of coding videos! I really appreciate how you explain things thoroughly and it is easy to understand

AKGamersLite
Автор

very nice, short and informative Tutorial! Perfect, Thank you!

xTheArtist
Автор

Great video thanks. In this case, can you only reference the ID field of the table or if you wanted to can reference another field in the table, like for example if I have a "user level" field in my table, could I access that?

sotak
Автор

Instead of having one huge python file you can use blueprints in flask to get your code organized

plusk
Автор

John Elder is up there with Angela Yu and Scott Hanselman as the best code explainers imo

lator
Автор

Can you do a video of this using Flask-Admin? It's an interesting tool but I can't figure out how to make authentication work on that. Thanks for your videos, they're really well done.

SkipperStyle
Автор

is there a way to add something like @admin.required before a function?

therot
Автор

Sir you have literally saved my job thank you, I am searching for this from 2 days, and here it is

gqij
Автор

Well yes you are correct. This is a janky way to do it. But please make a tutorial on Flask-Admin. That would be great.

hchc
Автор

bro, pls i wanna ask you a question
how i can get password wifi on laptop

mohammadrajha