Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout Not woking in Django Admin #33

Open
yashraj077 opened this issue Jun 6, 2021 · 2 comments
Open

Logout Not woking in Django Admin #33

yashraj077 opened this issue Jun 6, 2021 · 2 comments

Comments

@yashraj077
Copy link

Django Admin Logout is not working

redirecting to https://localhost/logout/
instead of https://localhost/admin/logout/

@BismarkCT
Copy link

I had to add a route in default url.py.

from django.shortcuts import redirect
from django.contrib import admin
from django.urls import path

urlpatterns = [
path("admin/", admin.site.urls),
path("logout/", lambda request: redirect("/admin/logout", permanent=False)),
]

@nuresh
Copy link

nuresh commented May 29, 2024

i have tried this
from django.shortcuts import redirect
from django.contrib import admin
from django.urls import path

urlpatterns = [
path("admin/", admin.site.urls),
path("logout/", lambda request: redirect("/admin/logout", permanent=False)),
]

but for me it is still not working.
Screenshot 2024-05-29 111654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants