I use python Flask for a web application. I can not deal with the sessions. I saw lots of examples, but there is no clear picture in my head. Here for example what code is written to create sessions.
def login(): if request.method == 'POST': session['username'] = request.form['username'] return redirect(url_for('index')) return ''' @app.route('/logout') def logout(): # remove the username from the session if it is there session.pop('username', None) return redirect(url_for('index')) The question is as follows. But for one user, everything is clear, but when there are a large enough number, where do I get this 'username' to terminate the session for the user who pressed the logout on the site?