We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a00a76c commit 9b883cbCopy full SHA for 9b883cb
econplayground/templates/base.html
@@ -113,14 +113,19 @@
113
<li class="nav-item">
114
{% if request.user.is_anonymous %}
115
<a class="nav-link" title="Log In" href="/accounts/login"><span title="Log In">Log In</span></a>
116
- {% else %}
117
- <a class="nav-link" title="Log Out" href="/accounts/logout/?next=/"><span title="Log Out">
+ {% else %}
+ <form action="{% url 'logout' %}" method="post">
118
+ {% csrf_token %}
119
+ <button type="submit" class="nav-link" title="Log Out">
120
+ <span title="Log Out">
121
{% if user.first_name %}
122
{{user.first_name}}
123
{% else %}
124
{{user.username}}
125
{% endif %}
- | Log Out</span></a>
126
+ | Log Out</span>
127
+ </button>
128
+ </form>
129
130
</li>
131
</ul>
0 commit comments