Hi Robert, I had the same problem. Since I switched from FCGI to mod_python the problem disappeared. I still don't know what was the _real_ reason for that. However, I noticed it was possible to get rid of the problem temporarily by clearing the browser cache (or cookies). I bet it was caused by the error processing mechanism in Django/FCGI somehow screwing up the cache control HTTP headers.
Regards, Mike Ivanov On Oct 17, 2:50 pm, "Robert mol" <[EMAIL PROTECTED]> wrote: > Hello, > I have HomePage with login bar with a form for user to log in. I use > django.contrib.auth.login to log user in. When I enter it from the > /accounts/login/ page it works ok. However trying to login from homepage is > not working. I have to do it twice (always). On django# there were more > users with same experience. They recommended to write own login view. So I > did and it works ok. > > After digging into django.contrib.auth.view.login I found out the code fails > at checking errors > > errors = manipulator.get_validation_errors(request.POST) > > with: > > {'username': ["Your Web browser doesn't appear to have cookies enabled. > Cookies are required for logging in."]} > > and hence redirecting to /accounts/login/ (and setting up a test_cookie). > > I guess I'm supposed to setup a test cookie first right? But how? I didn't > find any documentation for this :( > > my urls.conf: > from django.contrib.auth.views import login, logout > > (r'^$', direct_to_template, {'template':'index.html'}), > (r'^accounts/login/$', login), > > Thank you > > Robert --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---