On Sun, Jun 22, 2008 at 10:20 PM, mcordes <[EMAIL PROTECTED]> wrote:
>
> I seem to already have the auth middleware enabled too. From what I'm
> seeing, generic views _do_ have the user object available in their
> templates. It's just my custom views that don't automatically have
> this. It's easy enough for me to pass in the request.user object from
> each of my templates, but I really thought I wouldn't need to do this.
render_to_response doesn't use a RequestContext whereas the generic views do.
To enable this in render_to_response try:
from django.template import RequestContext
...
render_to_response('some/template.html',
context_instance=RequestContext(request))
Hope this helps,
Nick
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---