stupidgeek wrote:

>     def get_user(self, username):
>         try:
>            user = User.objects.get(username=username)
>            print user
>            return user
>         except User.DoesNotExist:
>             return None
> 

Note part of the auth backend protocol AFAICS involves calling
get_user() itself* (not just authenticate()), and it is expected to take
a user_id arg, not username, i.e. you very likely need it to be:

def get_user(self, user_id):
    try:
       return User.objects.get(pk=user_id)
    except User.DoesNotExist:
       return None



* django/contrib/auth/__init__.py







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

Reply via email to