On Fri, Mar 19, 2010 at 3:23 PM, Paulo Almeida
<[email protected]> wrote:
> I think what's happening is you are assigning a string to the 'login'
> variable:
>
> login = request.POST['login']
>
> So when you get to:
>
> login(request, user)
>
> login is the text and not the function.
>
> HTH,
> Paulo
>

Its worse than that he's dead Jim!

You have far too many things called login:

> from django.contrib.auth import authenticate, login
..
> def login(request):
..
>            login = request.POST['login']
..
>                   login(request, user)

Change your import line to avoid collisions:

from django.contrib.auth import authenticate, login as django_login

Change your variable named login (since it is a username, perhaps
'username' is appropriate.)

Read more on shadowing :)

http://en.wikipedia.org/wiki/Variable_shadowing

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 [email protected].
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