On Sat, May 16, 2009 at 11:14 PM, mickey <davidan...@gmail.com> wrote:
> > Ok this doesn't sound too intuitive. If anyone else have a better > solution please do post. > > Thanks. > > On May 16, 8:01 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > > On Sat, May 16, 2009 at 9:57 PM, mickey <davidan...@gmail.com> wrote: > > > > > So are you telling me to pass the template name for each and every > > > functions i define in views.py? > > > > Yes, the best way would probably be to write a wrapper function around > > render_to_response that took the template name and put it into the > context > > dictionary. > > > > Alex > > > > -- > > "I disapprove of what you say, but I will defend to the death your right > to > > say it." --Voltaire > > "The people's good is the highest law."--Cicero > > > There isn't a better solution, a Template doesn't store the file it was rendered from (especially since that doesn't make sense for all template loaders, such as if you render a template from a string), nor does the context inherently have it available. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire "The people's good is the highest law."--Cicero --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---