I'm having an issue with LoginView when we go back to the login page using 
the browser back button. I've deployed a simple web app (
https://jodelasur.pythonanywhere.com) so you can test for yourself.

Steps to recreate:

   1. Enter invalid (random) credentials and submit. You should see the 
   "Your username didn't match" error.
   2. Enter valid credentials (user: user, password: userpassworduser). You 
   should be logged-in successfully and redirected to home page.
   3. Press the back button.

Actual output: Browser error (Chrome: Confirm Form Resubmission, Firefox: 
Document Expired).
Expected output: Still redirect to home page, since l'm already 
authenticated.

If I don't enter invalid credentials as the first step (i.e. just do steps 
2 and 3), no error page appears, and I get the expected output of being 
redirected to the home page even after pressing the back button.

Here's the repo url if you need to see the code: 
https://github.com/jodelasur/login_view_test.

How do I avoid this error?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6020d918-634c-4e43-a290-c9495efe3897%40googlegroups.com.

Reply via email to