1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Fixed the annoying login error that happens in some cases when REGISTRATION_COOKIE_DOMAIN isn't set. Now, generally you don't have to sete REGISTRATION_COOKIE_DOMAIN unless you want to use multi-domain cookies (such as '.foo.com')

git-svn-id: http://code.djangoproject.com/svn/django/trunk@216 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-07-19 19:13:33 +00:00
parent 5874952a8e
commit 307f3a95c7

View File

@ -232,7 +232,7 @@ class Session(meta.Model):
user.save()
session = create_session(user_id)
key, value = session.get_cookie()
cookie_domain = REGISTRATION_COOKIE_DOMAIN or request.META['SERVER_NAME']
cookie_domain = REGISTRATION_COOKIE_DOMAIN or None
response.set_cookie(key, value, domain=cookie_domain)
class Message(meta.Model):