Skip to content

Commit

Permalink
fix: instead of pointing to admin, use the user login/logout routes
Browse files Browse the repository at this point in the history
This requires the `django.contrib.auth.urls` to be included or to create
`login` and `logout` routes.

Closes: #353
  • Loading branch information
b1rger committed Oct 18, 2023
1 parent 0bd2446 commit a5073db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis_core/apis_metainfo/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
aria-expanded="false">User: {{ user.get_username }}</a>
<div class="dropdown-menu dropdown-menu-right">
<div class="dropdown-item">
<a class="nav-link p-0" href="{% url 'admin:logout' %}">
<a class="nav-link p-0" href="{% url 'logout' %}?next=/">
<span class="material-symbols-outlined">logout</span>
log out
</a>
Expand All @@ -165,7 +165,7 @@
{% else %}
<li class="nav-item dropdown ml-auto">
<a class="nav-link p-0"
href="{% url 'admin:login' %}?next={{ request.path|urlencode }}">
href="{% url 'login' %}?next={{ request.path|urlencode }}">
<span class="material-symbols-outlined">login</span>
</a>
</li>
Expand Down

0 comments on commit a5073db

Please sign in to comment.