On Sat, 2007-06-09 at 16:33 +0100, Mike H wrote:
> Hi Malcolm,
> 
> I'm more than willing to help track down the error (as if I dont get it 
> fixed, I cant use Django! Asking customers to log in twice wont go down 
> well...)
> 
> I have a question though : After the first load of the login page, 
> should a session have been started for me? Or does the session only get 
> started once i submit the login form?

Assuming you have the SessionMiddleware installed, you will have a
session created whenever you access a page that Django is responsible
for.

The way the login() call should work is when you first GET the page, it
sets the test cookie as part of the response you are sent back (the page
itself). Then, as part of processing the POST -- the logging in phase --
it checks that the test cookie was set correctly.

So, avenues to investigate would be to check if the test cookie is being
set (the cookie's name is "testcookie" and it should have a value of
"worked") after the get and to check it is being sent back as part of
the POST.

Session creation and the test cookie stuff is in
contrib/sessions/middleware.py in the code.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to