i am using python flask to build a simple web app in which user can hit a path say localhost:8000/ and login and if login is successful another page is displayed but i want to know how can i redirect to the main page if the user is already logged in ? for ex. if i log in for the first time i am taken to the main page and if i open a second tab and again hit the url for login i am redirected to the main page automstically( much like gmail? ).
class LoginPage(object):
def on_get(self, req, resp, form={}):
# ??? han
Aucun commentaire:
Enregistrer un commentaire