Looks like you might have overridden the login method with a string.
In the first line, you refer to 'login' as a string, so I'm guessing
it overrides 'login' the method.
Rename 'login' to something else.
On Sep 7, 9:14 am, bayman666 <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm pretty new to django and developing my first application.
>
> I was able to setup the database for the authentication and
> authorization system successfully. I checked the setting.py file and
> made sure that all apps and middleware are included in it.
>
> I made user registration system. I also, was able to authentication
> users sucessfully, however, I'm having trouble with login function.
>
> In my view I authenticate user using:
>
> user = authenticate(username=login,password=secret)
> if user is not None:
> if user.is_active:
> # login(request, user)
> return HttpResponseRedirect('/profile/')
>
> If I comment the fourth line, it will successfully go to "profile"
> page, which means the authentication works file. But when I uncomment
> the fourth line, it gives me the following error:
> 'unicode' object is not callable
>
> I have imported all necessary files, but don't know why it's giving me
> that error.
>
> Any idea what can be wrong with my code?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---