Answer the question
In order to leave comments, you need to log in
Flask, how to store data in session?
Good evening, the algorithm of actions is as follows, the user enters, the data is added to the session and we can check which links to show him. The user has not logged in - REGISTRATION, LOGIN, if logged in, then a link to EXIT. It would be nice if we could check the data in any template. And is it possible to implement this through flask.session ?
Answer the question
In order to leave comments, you need to log in
if session.get('authenticated', None) == None:
# User is NOT authenticated
# some code here
def authenticate():
# check user's login and pass
# ... then
session['authenticated'] = True
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question