Redirect to index page for logged in users in Django
I have a problem if I close a browser page without having logged out and re-enter with another browser tab as the session is still active (and I have the login url in the root, example: http://localhost:8000) it takes me again to the login and I would like that when a user was already logged in it would take me to the index. All are based in function base views.
Thank you very much in advance.