fix(admin_login): redirect authenticated users away to prevent loop
This commit is contained in:
parent
46c6591170
commit
7dd8350cec
|
@ -14,6 +14,9 @@ def unauthorized(request):
|
|||
|
||||
|
||||
def admin_login(request):
|
||||
if request.user.is_authenticated:
|
||||
return redirect("unauthorized")
|
||||
|
||||
query = ""
|
||||
if next := request.GET.get("next"):
|
||||
q = QueryDict(mutable=True)
|
||||
|
|
Loading…
Reference in New Issue