Only Allow Correct User To Edit Posts - Flask Fridays #30

preview_player
Показать описание
In this video I'll show you how to make sure only the correct user can edit a post.

Up till now, anyone can edit a post, and that's no good! It's fairly easy to check to see who the correct user is for each post.

We'll also remove the edit and delete buttons from post pages for people who aren't the correct user.

#flask #codemy #JohnElder

Timecodes

0:00​​ - Introduction
1:25 - Check For Correct User In Edit View
3:04 - Throw Error Message If Not Correct User
4:24 - Remove Edit Buttons From Posts Page
5:37 - Remove Edit Buttons From Single Posts
6:42 - Conclusion
Рекомендации по теме
Комментарии
Автор

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

Codemycom
Автор

the most underated programming channel. Thank you so much. Like seriously, you deserve more subs, views, everything! Keep making these awesome vids, you'll surely be the top programming channel on YT soon, #CodemyDaBest

iceyvision
Автор

Hi!
I like your videos. I live in Turkey and I have to say that my country's education system can't even beat your videos. If I had worked with you, I would have learned much more than I could in my country. I am sure that my country has worst education system in the world.

mr.unknown
Автор

Congratz for 80k subs, road to 100k subs

TheGroup
Автор

From security stand point which is better? take out the function and leave the buttons? or take out the delete and edit buttons with if statement?

hoseinmohamadzadeh
Автор

Works like a charm! Your videos are awesome!

alexi
Автор

Please explain how autocompletion works in the text editor.

عبدالرحمناحمد-خس