1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How to remove session id in logout?

Discussão em 'Python' iniciado por Stack, Setembro 16, 2024.

  1. Stack

    Stack Membro Participativo

    I have a problem: when I do logout in Django I can still see a session id cookie in my browser and even after login I can acess an index page which is decorated with login_required. Please see the code below.

    @login_required(login_url='signin')
    def logout(request):
    auth.logout(request)
    return redirect('signin')

    @login_required(login_url='signin')
    def index(request):
    return render(request, 'index.html')


    I am quite frustrated and do not get what is misconfiured, chat gpt is suggesting some garbage(as ususal) Tried to remove session manually, tried to flush and so on - nothing works in chrome and safari

    Continue reading...

Compartilhe esta Página