#9874: Template reuse is worthless(when inheretiance or inclusion involved)
because parent templates get re-compiled every time
-----------------------------+----------------------------------------------
 Reporter:  novoya           |       Owner:  nobody    
   Status:  new              |   Milestone:            
Component:  Template system  |     Version:  SVN       
 Keywords:  template cache   |       Stage:  Unreviewed
Has_patch:  1                |  
-----------------------------+----------------------------------------------
 The following view module fails to make good reuse to the template
 For each new request, all inherited/included templates will be recreated
 and compiled
 {{{
 tpl = loader.get_template('mytemplate.html')

 def view_func1(request):
      '''
         Any inherited templates from tpl
         will created and recompiled again and again
      '''
      return HttpResponse(tpl.render(context))
 }}}
 Attached a very simple patch to solve the problem:
 1.Simple template caching in the django.template.loader
 2.Minimum change in django.template.loader_tags

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9874>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to