[Fixed]-Prevent Django from logout through url before hitting enter

0👍

I ended up using a POST-method as suggested by @danihp.

1👍

What i am doing is redirecting the user to my login page.So I should say you should try this.My application only logouts after I hit the enter button.

url:-

app_name = 'name'
url(r'^logout$', user.logout_user, name='logout_user'),
 url(r'^$', user.login_user, name='login'),

views:-

def logout_user(request):
    logout(request)
    return redirect('name:login')

Leave a comment