Flask-Web-App-Tutorial icon indicating copy to clipboard operation
Flask-Web-App-Tutorial copied to clipboard

User is undefined error

Open marty1982 opened this issue 3 years ago • 3 comments

https://github.com/techwithtim/Flask-Web-App-Tutorial/blob/3a35f0e491e145e55f0259f848b9fbe64a7a5123/website/templates/base.html#L32

Hi Tim! First off thanks a lot for uploading this tutorial, is great!.

I've found an error when executing the file base.html. The error says "user is undefined" and is exactly at line 32. I think there is an undeclared variable or so. I could make it work deleting that "IF" line so in order to go with the flow.

Thanks a lot!

Stay safe!

Regards, Martin.-

marty1982 avatar Oct 07 '21 12:10 marty1982

I had this problem too for a bit. Pretty much this line doesn't get added till much later so you can't copy the entire base html directly if you are following along with the video. try to only copy the parts he shows on screen

bstokes0971 avatar Oct 13 '21 21:10 bstokes0971

Thanks a lot for your email.

I'm following the whole video and is great. I have a junior concepts of programming and is very useful your kind of teaching.

Regards!

Martin.-

El mié, 13 oct 2021 a las 18:49, bstokes0971 @.***>) escribió:

I had this problem too for a bit. Pretty much this line doesn't get added till much later so you can't copy the entire base html directly if you are following along with the video. try to only copy the parts he shows on screen

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/techwithtim/Flask-Web-App-Tutorial/issues/27#issuecomment-942746979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGHULN2VZAPCYIRR6AFW6FDUGX5GXANCNFSM5FRGM6VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

marty1982 avatar Oct 13 '21 22:10 marty1982

if you are facing problem when you reach here, just make sure you type {% if current_user.is_authenticated %} instead of {% if user.is_authenticated %} . Good luck:)

rohail642 avatar Nov 21 '23 11:11 rohail642