On Tue, Oct 26, 2010 at 1:05 AM, Joakim Hove <[email protected]> wrote: > >> However, if you just want to know the top-level template that started >> the rendering process, you could obtain this by writing a custom >> render_to_template() shortcut that inserts the loaded template name >> into the context. > > Thank you, > > I considered writing this custom render_to_template() shortcut, but > hoped maybe there was a simpler solution. I will be using this custom > shortcut quite extensively - i.e. I would like existing code which > currently calls render_to_response() to change over to my new shortcut > without updating every call. Is there a reasonably elegant way to > achieve this?
An *elegant* way? Not that I can think of. To alter existing uses of render_to_response you would need to get into monkeypatching, which is never a good option :-) Yours, Russ Magee %-) -- 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.

