On Thu, Sep 17, 2009 at 10:28 AM, Tom <[email protected]> wrote:
>
> Hi group,
>
> my project has a base template used by all apps. I want to show
> information about the currently authenticated user like "You are
> currently logged in as user 'Pete'" in all my apps.
>
> Is there a way to display that information without having to pass
> context_instance=RequestContext(request) in every view function?
>
> I recently switched from Turbogears to Django. In TG, I could just
> import the request object into a template. As far as I understand,
> this is not possible in Django.
>

I wrote a simple decorator for this
(http://www.djangosnippets.org/snippets/1733/)

The view must return a dict.

-- 
Kind Regards

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

Reply via email to