Seems that any solution would be dirty, so why don't you set threadlocal variable with request and monkey-patch template loader?
On Tue, Oct 13, 2009 at 11:03 PM, Nan <ringe...@gmail.com> wrote: > > > The trouble is that I've got third-party apps that have their own > views that don't include the template logic. > > so in thirdpartymodule.views.py: > > def thirdpartyview(request, vars): > # Do lots of fancy processing > return render_to_response('template.html', context) > > > In my project, I need a view that is essentially the same as > thirdpartyview, but also has the template selection logic instead of > the hardcoded template path -- and I need to do this for every view I > use for every third party app I've installed. > > It seems a) silly and b) unmaintainable to completely duplicate all > the logic from all the views from all these apps just to > programmatically change the template path. > -- regards, Mihail --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---