I'm working on a website for an internship. I've implemented a logout button but when I logout, after the user deconnection, I have a redirection on the home page, but I don't want this, for example if I'm in url.com/toto/tata
, after the logout I would like to stay in this path and not have a rediction to url.com/home
.
<form method="POST" action="{% url "account_logout" %}" class="form-horizontal">
{% csrf_token %}
<div class="form-actions">
<button type="submit">Logout</button>
</div>
</form>