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

jinja2.exceptions.UndefinedError: 'user' is undefined

Open Oluwa-Temmy opened this issue 2 years ago • 1 comments

I've copied the code from the github page and it's giving me a user is undefined error. This is my first time ever using html so I am pretty lost on what to do or where exactly my problem is. The error is in the base.html document on line 32. I copied it just as it is, but I am not sure what is wrong. If you need more info just reply back.

File "C:\Users\Zerchoel\AppData\Local\Programs\Python\Python311\Lib\site-packages\jinja2\environment.py", line 485, in getattr return getattr(obj, attribute) ^^^^^^^^^^^^^^^^^^^^^^^ jinja2.exceptions.UndefinedError: 'user' is undefined

Oluwa-Temmy avatar Nov 04 '22 13:11 Oluwa-Temmy

for now just delete the lines 32, 35 and 38 in the base.html file you copied.

m-lok avatar Nov 27 '22 08:11 m-lok