Flask Tutorial Web Development with Python 20 - Login Required Decorator Wrapper

preview_player
Показать описание
Welcome to part 20 of our Flask web development tutorial, in this video we discuss how to use various decorator wrappers. The example used here is for a login_required wrapper, which requires a user to be logged in to view the page. If they are not logged in, then it notifies them and sends them to the login page.

You can use these wrapper functions, however, to protect pages for subscribers, admins, and other various user requirements.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

Thank you so much. This helped me to solve my so fast! :D

emeline
Автор

is this the best way to have login required pages or would using flask-login be better in some way? What's the difference

hannahtellambura
Автор

Im getting a 500 after adding @login_required above my logout function (before adding this, everything else worked pointers as to what is going wrong?

downtime-pu
Автор

I am having a difficulty in grasping the wrapper functionality. Can you suggest me from where to read about it?

amitabh
Автор

Can you explain me how to create a multiline (from\r\n) Output in jinga without using |Safe?

brotcast
Автор

I am getting problems with the wrapper function here, when I debug it is saying @wraps(f) NameError: global name 'wraps' is not defined

jrk
Автор

i am parform this video video but after login are not index page will be render

savanvirani