Add Logout button
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
{% block content %}
|
||||
{% if user.is_authenticated %}
|
||||
Hi {{ user.username }}!
|
||||
<form action="{% url 'logout' %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button type="submit">Log out</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>You are not logged in</p>
|
||||
<a href="{% url 'login' %}">Log In</a>
|
||||
|
||||
Reference in New Issue
Block a user