On Tue, Nov 24, 2009 at 5:28 PM, Gloria <strang...@comcast.net> wrote:
<snip>

> Traceback:
> File "/usr/lib/python2.6/site-packages/Django-1.1.1-py2.6.egg/django/
> core/handlers/base.py" in get_response
>  92.                 response = callback(request, *callback_args,
> **callback_kwargs)
> File "/mnt/XP_D/Opencrowd/PressGaney/pg_trunk/main/pg/ip/profile/
> views.py" in local_login
>  82.   user = authenticate(user_name)
>
> Exception Type: TypeError at /login/
> Exception Value: authenticate() takes exactly 0 arguments (1 given)
>
> Thanks,
> Gloria
>

Hmm, I'm not sure you're doing this correctly. You shouldn't be trying to
call the authenticate() method on your custom backend, you should be calling
django.contrib.auth.authenticate, with whatever usernames/tokens/etc you
have to provide. Django's auth system will iterate through its backends, as
defined in settings.AUTHENTICATION_BACKENDS, calling each of them in turn
until one of them returns something other than None.

See
http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backendfor
more details.

I still think you are directly calling a function called authenticate() that
is not django.contrib.auth.authenticate()..

Cheers

Tom

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.


Reply via email to