Sunday, July 3, 2011

Solved - Django "Your Web browser doesn't appear to have cookies enabled."

If you get this error message on your Django login-page:


     Your Web browser doesn't appear to have cookies enabled. Cookies are required for logging in.

and you have made sure that your browser DOES have cookies enabled, then you should check your settings.py's SESSION_* configurations very carefully.

Maybe you have the SESSION_COOKIE_SECURE set to True accidentally when you don't have SSL.
Maybe you have the SESSION_COOKIE_DOMAIN set to a domain that's actually not your domain.

#settings.py

# If not SSL, should be false
SESSION_COOKIE_SECURE = False
# Check other SESSION_* settings too

No comments:

Post a Comment