#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 lrekucki):

 Replying to [comment:20 David Danier <david.dan...@team23.de>]:
 > The current implementation does it right I think, it loads the template
 on compile time to check for syntax errors. This should definately stay,
 as this is a cool feature.
 >
 > 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.

 Isn't that what "django.template.loaders.cached.Loader" does ?

-- 
Ticket URL: <http://code.djangoproject.com/ticket/3544#comment:21>
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