I know this is way delayed, but in the hopes it helps someone else out there... if you have,
SESSION_COOKIE_SECURE = True then the browser may not be sending the cookie back to your view on an http (i.e. not https) page. The behavior is as you described. The admin login complains that the browser does not have cookies enabled. And you can see that a cookie was created corresponding to the domain. I most often develop using the django dev server, without https obviously, and sometimes forget to switch off SESSION_COOKIE_SECURE. On Mar 25, 1:04 pm, Tim <tim.hueg...@gmail.com> wrote: > On Mar 25, 4:44 pm, Genghisu <gengh...@gmail.com> wrote: > > > Have you set SESSION_COOKIE_DOMAIN in settings.py? Without that being > > set correctly, you'll run into the problem you've described above. In > >yourcase, > > > SESSION_COOKIE_DOMAIN = 'dev.mydomain.com'. > > >http://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-domain > > Hi Genghisu, > > Yes I've tried that and it made no difference at all. > > I've delved much deeper into the Django session code, in an attempt to > debug my problem. I added the following line of code to the > django.contrib.sessions.backends.base file: > > def test_cookie_worked(self): > ++ print "%s == %s" % (self.get(self.TEST_COOKIE_NAME), > self.TEST_COOKIE_VALUE) > return self.get(self.TEST_COOKIE_NAME) == > self.TEST_COOKIE_VALUE > > That outputs the following when I attempt to log in: > > [25/Mar/2010 16:55:09] "GET /admin/ HTTP/1.1" 200 1680 > None == worked > [25/Mar/2010 16:55:14] "POST /admin/ HTTP/1.1" 200 1826 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.