On Oct 9, 4:58 pm, Robocop <[EMAIL PROTECTED]> wrote:
> request.user will return the currently logged in user, so i'm assuming
> your login code is returning nothing.
>
> Try something like user  = auth.authenticate(username =
> username_from_html, password = password_from_html) in your login code,
> and then see if you can use the {{user}} variable in the page your
> login code redirects to.

I thought that my login view might help:
def login(request):
    username = request.POST['username']
    password = request.POST['password']
    #user = auth.authenticate(username=username, password=password)
    auth.login(request, user)
    if request.user.is_authenticated():
        login(request, user)
        user = auth.authenticate(username=username_from_html,
password=password_from_html)
    else:
    # Do something for anonymous users.

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to