X
X

Select Your Currency

Türk Lirası $ US Dollar
X
X

Select Your Currency

Türk Lirası $ US Dollar
Yıllık Satın Alımlarda %15 İndirim: Şimdi Tasarruf Edin! Detaylı Bilgi İçin Tıklayın!

Knowledge Base

HomepageKnowledge BaseGeneralDjango Session Logout Firefox Error...

Django Session Logout Firefox Error Solution

While using a session in your Django projects, if the user who logs out is using Firefox, it still appears in the session.

To fix this problem, we can write a custom logout function.

urls.py

from django.contrib.auth import logout
from django.shortcuts import redirect
from django.urls import path, includedef exit_yap(request): for sesskey in list(request.session.keys()):
print(request.session[sesskey])
del request.session[sesskey] logout(request)
return redirect('/admin/')
urlpatterns = [
path('', homepage),
path('admin/logout/', logout_do),
path('admin/', admin.site.urls),
]

Can't find the information you're looking for?

You have examined the knowledge base in detail, but if you cannot find the information you need,

Create a Support Ticket
Did you find it useful?
(70 times viewed. / 0 people found helpful.)