From 6d829bd995861f6b8ce4d87ef9de2235bd4e4bb5 Mon Sep 17 00:00:00 2001 From: chriscummings Date: Mon, 7 Jul 2025 16:01:42 -0500 Subject: [PATCH 1/2] fix(login/logout url): use redirect instead of reverse --- scram/route_manager/context_processors.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scram/route_manager/context_processors.py b/scram/route_manager/context_processors.py index b87dcf70..0076a130 100644 --- a/scram/route_manager/context_processors.py +++ b/scram/route_manager/context_processors.py @@ -1,7 +1,7 @@ """Define custom functions that take a request and add to the context before template rendering.""" from django.conf import settings -from django.urls import reverse +from django.urls import redirect from scram.route_manager.models import Entry @@ -12,8 +12,8 @@ def login_logout(request): Returns: dict: login and logout URLs """ - login_url = reverse(settings.LOGIN_URL) - logout_url = reverse(settings.LOGOUT_URL) + login_url = redirect(settings.LOGIN_URL) + logout_url = redirect(settings.LOGOUT_URL) return {"login": login_url, "logout": logout_url} From d8703516074f91c8917a2bc248281fb744bc446f Mon Sep 17 00:00:00 2001 From: chriscummings Date: Mon, 7 Jul 2025 16:08:46 -0500 Subject: [PATCH 2/2] fix(login/logout): silly goose, use the right imports. --- scram/route_manager/context_processors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scram/route_manager/context_processors.py b/scram/route_manager/context_processors.py index 0076a130..00d51672 100644 --- a/scram/route_manager/context_processors.py +++ b/scram/route_manager/context_processors.py @@ -1,7 +1,7 @@ """Define custom functions that take a request and add to the context before template rendering.""" from django.conf import settings -from django.urls import redirect +from django.shortcuts import redirect from scram.route_manager.models import Entry