On Mon, Mar 14, 2011 at 2:26 PM, Adam Knight <a...@hopelessgeek.com> wrote:
> On the description for django.contrib.auth.views.login at > http://docs.djangoproject.com/en/1.2/topics/auth/#django.contrib.auth.views.loginthe > documentation says: > > If you are using alternate authentication (see Other authentication >> sources) you can pass a custom authentication form to the login view via the >> authentication_form parameter. This form must accept a request keyword >> argument in its __init__ method, and provide a get_user method which returns >> the authenticated user object (this method is only ever called after >> successful form validation). > > > Note the phrase "This form must accept a request keyword argument in its > __init__ method". When I do this as it literally states and expect a > "request" keyword argument, I don't get a request. When I looked at > django.contrib.auth.views.login on line 31 I see that it's actually setting > the keyword argument "data" instead. > > Did I miss something or is this a bug I should file? > > (Yes, expecting the "data" keyword works perfectly, but it's not in the > documentation that I can see.) > It's more likely a bug in the code that the request argument is not being passed in the post leg of that view. There's a ticket open on that: http://code.djangoproject.com/ticket/15198 Karen -- http://tracey.org/kmt/ -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.