I have a Django website that requires users to be logged in to view any page. I added some middleware according to the instructions on this page. The middleware does redirect users to the login page as expected, however the GET request is duplicated every time. Why is the request sent twice? (Or possibly output to the Django console twice?) Here is the output from the Django console after navigating to 127.0.0.1/reservations/:
[08/May/2012 15:08:41] "GET /reservations/ HTTP/1.1" 302 0
[08/May/2012 15:08:42] "GET /login/ HTTP/1.1" 200 575
[08/May/2012 15:08:42] "GET /login/ HTTP/1.1" 200 575
I have had the same problem and it was a firefox extension I used causing this weird issue.
Try with another browser to see if the problem goes away. 🙂