M
M
mefisto6612019-12-21 12:49:01
Python
mefisto661, 2019-12-21 12:49:01

How to implement authorization in Flask? How to get the last online user?

Just started to deal with Flask, do not judge strictly =)
1) I'm going to implement user login / logout through a variable in the session (session['username'] = username). Are there better options? I can't use ORM, Flask-Login, etc. on assignment.
2) We need to get the date and time when the user was online for the last time. The only idea at the moment is to make an ajax request every minute and update the corresponding entry (last_login_time) in the database.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question