views:

44

answers:

1

I can't login to the admin site on localhost.

I try with firefox, IE.

I try using the 127.0.0.1:8000 address. Also, I set the SESSION_COOKIE_DOMAIN to localhost, localhost:8000

I change the host file to:

127.0.0.1       test.com

and set:

SESSION_COOKIE_DOMAIN = 'test.com'

I can login in production (only after the SESSION_COOKIE_DOMAIN configuration).

I'm using django rev 1.0.1. I can't upgrade to last trunk. The best, is move to 1.0.2.

Update: I try adding to the host file my public domain, and not works (ie: 127.0.0.1 www.mysite.com).

A: 

Make sure you have localhost pointing to 127.0.0.1 in your /etc/hosts, set your SESSION_COOKIE_DOMAIN to 'localhost' (nb: port numbers are NOT part of the hostname) and start the dev server with the appropriate domain and port, ie:

./manage.py runserver localhost:8000

FWIW, I never had to mess with SESSION_COOKIE_DOMAIN in any Django version since the 0.96 days.

bruno desthuilliers
This not work. Happened the same that I put in the question.
mamcx