#8116: django.template.loader.select_template should not silently skip a 
template
which includes another template that does not exist
---------------------------------------------+------------------------------
          Reporter:  Michael P. Jung         |         Owner:  nobody
            Status:  new                     |     Milestone:        
         Component:  Template system         |       Version:  SVN   
        Resolution:                          |      Keywords:        
             Stage:  Design decision needed  |     Has_patch:  0     
        Needs_docs:  0                       |   Needs_tests:  0     
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by akaihola):

 The idea of the patch above is that all `TemplateDoesNotExist` exceptions
 encountered while compiling a template get changed to
 `IncludedTemplateDoesNotExist` exceptions, which are then checked for in
 `select_template()`.

 This is kind of what Michael P. Jung suggested, except it's handled at the
 loader level instead of in the `{% include %}` tag.
 Therefore, I think this will catch sub-templates loaded with whatever
 mechanism, not only with `{% include %}`.

 Also, in case of a missing included template, the exception displayed is:
 {{{
 IncludedTemplateDoesNotExist: template_path/template_name.html
 }}}

 Does this make sense, or would Make Amy's patch or his suggestion for a
 `template_name` exception attribute be a better approach? Some kind of a
 fix would be nice since the current behavior can be really confusing.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8116#comment:5>
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-updates@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