Add Logout button

This commit is contained in:
2024-06-28 14:26:30 -04:00
parent 989da8396e
commit 5f8fe95ef1
2 changed files with 6 additions and 1 deletions

View File

@@ -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>