Another post because I think I explain my issue a little better
here...
in my case:
1) a successful log in results in a call to a HttpResponseRedirect
that goes straight to the web page I'm specifying.
2) I checked right before this HttpResponseRedirect is called, and the
User object that was returned by login() is returning True (based on
user.is_authenticated())
3) The View that handles the URL specified by HttpResponseRedirect has
a request.session object that has an _auth_user_id corresponding to
the user that just successfully logged in.
4) that same view has a request.user that corresponds to an
AnonymousUser instance.
It would help me to know whether this is *normal* behavior -- right
after a user successfully logs in, the view handling the rendering of
the next web page has a request.session tied to this user, but the
request.user is AnonymousUser. Do I need to do something like the
following instead?:
views.py:
def show_page_after_successful_login(request):
uid = request.session.get('_auth_user_id')
user = User.objects.get(pk=uid)
request.user = user
rc = RequestContext(request)
return render_to_response(template, context, context_instance=rc)
thanks again...
--
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.