Skip to content

Commit

Permalink
Redirect to the page you came from after logging in
Browse files Browse the repository at this point in the history
turns out this is already a feature of the login page, we just needed to
make use of it

Also made sure to not redirect to /users/logout
  • Loading branch information
32th-System committed Jan 28, 2024
1 parent bc8f557 commit 1868270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion project/thscoreboard/thscoreboard/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
{% endif %}
{% else %}
<div class="banner-link">
<a href="/users/login">{% translate 'Log in' context 'Top bar' %}</a>
<a href="/users/login{% if request.path != "/users/logout" %}?next={{request.path}}{% endif %}">{% translate 'Log in' context 'Top bar' %}</a>
</div>
<div class="banner-link">
<a href="/users/register">{% translate 'Sign Up' context 'Top bar' %}</a>
Expand Down

0 comments on commit 1868270

Please sign in to comment.