But I still have to pass RequestContext(request) to render_to_response if I'm not using generic views, right?
On Oct 21, 8:38 pm, Andrew Ingram <a...@andrewingram.net> wrote: > jul wrote: > > hi, > > > in my base.html template I've got a header which needs httprequest > > (request.path, request.user.is_authenticated...). > > In all my views I'm passing the request object to render_to_response. > > Is there any better way to do that? > > > thanks > > jul > > Hi jul, > > There is a context processor that comes as part of django that gives you > access to the request object: > > http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-c... > > as long as you have it specified in your settings.py, it will > automatically become available if you use render_to_response > > Regards, > Andrew Ingram --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---