#3544: Fix {% include %} to allow recursive includes
----------------------------------------------------------------+-----------
          Reporter:  David Danier <goliath.mailingl...@gmx.de>  |         
Owner:  nobody       
            Status:  new                                        |     
Milestone:               
         Component:  Template system                            |       
Version:  SVN          
        Resolution:                                             |      
Keywords:  tplrf-patched
             Stage:  Accepted                                   |     
Has_patch:  0            
        Needs_docs:  1                                          |   
Needs_tests:  1            
Needs_better_patch:  1                                          |  
----------------------------------------------------------------+-----------
Comment (by twoolie):

 > So what needs to be changes is, that {% include %} needs to hase some
 kind of registry which templates alreads were loaded and not to reload
 them. Meaning {% include "some/file.html" %} loads the template and fires
 up the parser. Every folowing {% include "some/file.html" %} should not do
 that, regardless of this happens as a recursive call or not. This could
 even improve performance in non-recursive use cases.

 This is obviously beneficial
 >Isn't that what "django.template.loaders.cached.Loader" does ?

 Not really, the caching system returns Template objects, whereas if the
 include tag doesn't need to touch the entire template discovery stack
 every time, that would be awesome. an include tag local cache only costs
 one reference per included template so why not? if it speeds up include
 performance AND allows recursive imports then why not?
 also, embedded '''with''' syntax is insanely cool

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3544#comment:22>
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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to