Redirect to previous page on login, instead of home page

This commit is contained in:
Adam Goldsmith 2020-12-22 15:36:02 -05:00
parent e4b45ad948
commit ff42396208

View File

@ -24,7 +24,7 @@
{% if user.is_authenticated %} {% if user.is_authenticated %}
<a class="nav-item nav-link" href="/auth/logout"> Logout: {{ user }} </a> <a class="nav-item nav-link" href="/auth/logout"> Logout: {{ user }} </a>
{% else %} {% else %}
<a class="nav-item nav-link" href="/auth/login"> Login </a> <a class="nav-item nav-link" href="/auth/login?next={{ request.get_full_path }}"> Login </a>
{% endif %} {% endif %}
</div> </div>
</div> </div>