Hey Mike, On Sat, 2007-06-09 at 16:53 +0100, Mike H wrote: > Malcolm Tredinnick wrote: > > Assuming you have the SessionMiddleware installed, you will have a > > session created whenever you access a page that Django is responsible > > for. > > > > > > Thanks, exactly what I needed to know :) This is not happening. After > the first page view, I have no session.
Hmmm. :-( Line 28 of django/contrib/auth/views.py (in the login() method) would seem pretty convincing as far as trying to set the cookie goes. I wonder what's happening. Is the cookie not being set at the browser or not being sent at all in the response (something to establish)? I'm just wondering if it's sending a completely bogus path or something there. Checking the response on the browser side (e.g. with Firefox's web developer extension) might be an idea. This is where I was hinting that debugging prints might be needed, too. Poke around the login() method, the Session middleware, etc. If you haven't looked at middleware before, process_request() is called before calling any views and process_response() is called just before returning to the caller. Middlewares are called in order from top to bottom (or first to last, if you prefer to think of it as the Python sequence) for process_request() and last to first for process_response(). Anyway, I probably don't need to teach you to suck eggs. There can't be too many layers involved here, since calling the login view is pretty straightforward (I would have thought). Good luck. Feel free to ask questions (although I'm going to sleep now, so I won't be answering for a few hours; plenty of other people around here, though). 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 -~----------~----~----~----~------~----~------~--~---

