some more info...

I added "django.core.context_processors.request" to
TEMPLATE_CONTEXT_PROCESSORS

Based on my code below, it seems like the session is storing the
correct user ID for the user that just logged in (I confirmed this by
changing the user ID in the database manually), but for some reason
the user bound to the request is still AnonymousUser.  Did I overlook
something?

views.py:

def home(request):  # called after a successful authentication & login
    context = {}
    template = 'accounts/home.html'
    rc = RequestContext(request)
    print request.user  # prints "AnonymousUser"
    print request.session['_auth_user_id']  # prints out the correct
ID for the user who just logged in
    return render_to_response(template, context, context_instance=rc)

the home.html is just very basic right now:

{{ user.is_authenticated }} # returns False
{{ request.session.items }} # output includes the correct ID for the
user who just logged in

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