On Feb 12, 3:57 pm, pbzRPA <pbz...@gmail.com> wrote:
> It's going to be difficult to help you out if you using a custom
> authentication.
>
> Take a look at this comment from the django site and tell me if you
> following these rules in your custom authentication.
>


yes, django.contrib.auth.authenticate() is called first, then
django.contrib.authenticate.login() is called.  I can confirm this by
placing print statements at the appropriate places within the django
base code to tell me the code execution order.

In the function django.contrib.auth.views.login, if I put in a print
statement to show the result of request.user.is_authenticated() right
before returning HttpResponseRedirect, I get "True".

However, the view that handles the URL requested by
HttpResponseRedirect returns False when I check
request.user.is_authenticated().

I hope I'm being clear... thanks for responding,

Paul


> """
> Calling authenticate() first
>
> When you're manually logging a user in, you must call authenticate()
> before you call login(). authenticate() sets an attribute on the User
> noting which authentication backend successfully authenticated that
> user (see the backends documentation for details), and this
> information is needed later during the login process.
> """

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