I'm trying to build a form that when the login button is clicked, it displays a login succesful message. Here is the thing, I want that when the "login" button is clicked, the user gets redirected and in the redirected page (which is the home page), it should show the message. How can you do this in Django?
I've tried doing:
{% if request.user.is_authenticated %}
But the problem with this code is that the message appears each time, even when you reload the page.