#15502: TemplateDoesNotExist reports incorrect template during {% include %} 
from
Class Based Views / TemplateResponse objects
-----------------------------+----------------------------------------------
 Reporter:  jaylett          |          Owner:  nobody    
   Status:  new              |      Milestone:  1.3       
Component:  Template system  |        Version:  1.3-beta  
 Keywords:                   |   Triage Stage:  Unreviewed
Has patch:  0                |  
-----------------------------+----------------------------------------------
 If I have a `django.views.generic.base.TemplateView` as so:

 {{{
 from django.views.generic.base import TemplateView

 class FailingView(TemplateView):
     template_name = 'outer.html'
 }}}

 with `templates/outer.html` being:

 {{{
 {% include "inner.html" %}
 }}}

 and `templates/inner.html` not existing, then the exception is:

 {{{
 TemplateDoesNotExist at /search/
 outer.html
 }}}

 when it should be:

 {{{
 TemplateDoesNotExist at /search/
 inner.html
 }}}

 This appears to be similar to #12787, but a test case similar to
 `test_extends_include_missing_baseloader` does not show up the problem,
 apparently because `loader.get_template()` will raise the correct
 exception, but `loader.select_template()` is used with a list or tuple
 inside `SimpleTemplateResponse.resolve_template()`, and gets this wrong.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15502>
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