You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code was working perfectly untill I reached chapter about API. Now, it points to this file and piece of code:
authentication.py
in line: if not g.current_user.is_anonymous and not g.current_user.confirmed:
error: AttributeError: '_AppCtxGlobals' object has no attribute 'current_user'
The text was updated successfully, but these errors were encountered:
Not really. My code is just the same as yours. Actually I though that: As in the before_request method tha call will be made before every request, how would the g.current_user be defined if you call it in the very before_request method?
The verify_password is called automatically by the login_required decorator that is attached to the before_request function. That runs first and sets g.current_user.
It would be useful if you can debug on your side to figure out why the verify_password function isn't setting g.current_user.
The code was working perfectly untill I reached chapter about API. Now, it points to this file and piece of code:
authentication.py
in line: if not g.current_user.is_anonymous and not g.current_user.confirmed:
error: AttributeError: '_AppCtxGlobals' object has no attribute 'current_user'
The text was updated successfully, but these errors were encountered: