I come from a JavaScript background and I'm recently learning the server-side. I am under the impression that the controllers in the server-side is a 1 to many ratio in terms of interacting with the client side.
And I have this code for logging in:
@expose('/login/', methods=('GET', 'POST'))
def login_view(self):
if request.method == 'GET':
# Render template
if request.method == 'POST':
# Take email and password from form and check if
# user exists. If he does, log him in.
login.login_user(user)
# Store user_id in session for socketio use
session['user_id'] = login.current_user.id
# Redirect
I understand that the session dictionary is like the localStorage counterpart of JavaScript, so does this mean that there is a unique controller for every unique client? because then multiple clients would overwrite the session.user_id if they shared the same controller right?