On 10/8/07, lars <[EMAIL PROTECTED]> wrote: > I can see why it is necessary to instantiate RequestContext with the > request object. But in terms of DRY I wonder wether there isn't a > better way?
Sure, just write a short wrapper function which calls "render_to_response" and uses a RequestContext. One example which you can use is available on djangosnippets: http://www.djangosnippets.org/snippets/3/ Having Django "automatically" do this for you would be a bad idea, because context processors may expose information to templates that you wouldn't want to have globally available to template authors (for example, the "request" context processor, because it makes the full HttpRequest available, also necessarily makes things like the user's session -- which is an attribute of the request -- and any posted data available). -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---