From 4345134efe7075ff77dc3b9638e9cc99d759a18d Mon Sep 17 00:00:00 2001 From: Fer-Bar Date: Sat, 25 May 2024 21:33:44 -0400 Subject: [PATCH 01/16] Added LOGIN_REDIRECT_URL and LOGOUT_REDIRECT_URL urls --- albercan_backend/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/albercan_backend/settings.py b/albercan_backend/settings.py index 6e2ad27..ae95c5b 100644 --- a/albercan_backend/settings.py +++ b/albercan_backend/settings.py @@ -143,3 +143,6 @@ # https://docs.djangoproject.com/en/5.0/ref/settings/#default-auto-field DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" + +LOGIN_REDIRECT_URL = "/index" +LOGOUT_REDIRECT_URL = "/account/login" From 5af33095f0e77ff71dce1a76531b1faf99ceeb40 Mon Sep 17 00:00:00 2001 From: Fer-Bar Date: Sat, 25 May 2024 21:34:33 -0400 Subject: [PATCH 02/16] Added navbar.css styles to base.html --- albercan_backend/templates/base.html | 1 + 1 file changed, 1 insertion(+) diff --git a/albercan_backend/templates/base.html b/albercan_backend/templates/base.html index 4fdfd01..d68a3c2 100644 --- a/albercan_backend/templates/base.html +++ b/albercan_backend/templates/base.html @@ -20,6 +20,7 @@ + {% block styles %}{% endblock %} From 35f4c1a99ff1bfdd8a043632e07cb384ba4e8c35 Mon Sep 17 00:00:00 2001 From: Fer-Bar Date: Sat, 25 May 2024 23:27:38 -0400 Subject: [PATCH 03/16] Added logout link into navbar --- albercan_backend/static/css/navbar.css | 9 +++++++++ albercan_backend/templates/navbar.html | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/albercan_backend/static/css/navbar.css b/albercan_backend/static/css/navbar.css index 726198b..7e890b1 100644 --- a/albercan_backend/static/css/navbar.css +++ b/albercan_backend/static/css/navbar.css @@ -71,4 +71,13 @@ header .navbar .dropdown-menu .dropdown-item.active:hover { header .navbar .dropdown-menu .dropdown-item.active { background: #bc5148; color: #fff; +} + +#logout-form { + display: inline; +} +#logout-form button { + background: none; + border: none; + cursor: pointer; } \ No newline at end of file diff --git a/albercan_backend/templates/navbar.html b/albercan_backend/templates/navbar.html index c15d4cd..00c9eb6 100644 --- a/albercan_backend/templates/navbar.html +++ b/albercan_backend/templates/navbar.html @@ -1,7 +1,7 @@