Skip to content

Commit e749504

Browse files
Added logout flow so now users can logout from the dashboard
1 parent 50d945f commit e749504

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Algolyzer/Algolyzer/settings/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
ACCOUNT_AUTHENTICATION_METHOD = "email"
8585
ACCOUNT_EMAIL_REQUIRED = True
8686
LOGIN_REDIRECT_URL = "/dashboard/"
87+
ACCOUNT_LOGOUT_ON_GET = False
8788
ACCOUNT_SIGNUP_REDIRECT_URL = "/onboarding/"
8889

8990
LANGUAGE_CODE = "en-us"

Algolyzer/home/templates/home/dashboard.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22

33
{% block content %}
44
<div class="container mx-auto p-4">
5-
<h1 class="text-3xl font-bold mb-8">Dashboard</h1>
6-
5+
<h1 class="text-3xl font-bold mb-8">
6+
Welcome, {{ user_profile }}
7+
<form method="post" action="{% url 'account_logout' %}">
8+
{% csrf_token %}
9+
<button type="submit" class="btn btn-error">Sign Out</button>
10+
</form>
11+
</h1>
712
<!-- User Progress Section -->
813
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
914
<!-- XP Card -->

0 commit comments

Comments
 (0)