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
-~----------~----~----~----~------~----~------~--~---

Reply via email to