#30753: Add 'Did you mean...' when TemplateDoesNotExist occurs
---------------------------------+--------------------------------------
     Reporter:  Min ho Kim       |                    Owner:  Min ho Kim
         Type:  New feature      |                   Status:  assigned
    Component:  Template system  |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  1
---------------------------------+--------------------------------------
Description changed by Min ho Kim:

Old description:

> When 'TemplateDoesNotExist' occurs from using {% extends %} or {% include
> %} with wrong file names,
> technical_500.html only tells you that source does not exist.
>
> For example, use of below code...
> {{{
> base.html
> {% block content %}
> {% endblock %}
>
> home.html
> {% extends 'baseXX.html' %}
> {% block content %}
> This is home
> {% endblock %}
> }}}
> will give you...
>
> {{{
> TemplateDoesNotExist at /
> baseXX.html
> }}}
>

> I propose we add some informative message to help find the source of
> error by adding
>
> {{{
> Did you mean...
> base.html
> }}}

New description:

 When 'TemplateDoesNotExist' occurs from using {% extends %} or {% include
 %} with wrong file names,
 technical_500.html only tells you that source does not exist.

 For example, use of below code...
 {{{
 base.html
 {% block content %}
 {% endblock %}

 home.html
 {% extends 'baseX.html' %}
 {% block content %}
 This is home
 {% endblock %}
 }}}
 will give you...

 {{{
 TemplateDoesNotExist at /
 baseX.html
 }}}


 I propose we add some informative message to help find the source of error
 by adding

 {{{
 Did you mean...
 /Users/minhokim/Code/Django/djangodev/empty/templates/base.html
 /Users/minhokim/Code/Django/djangodev/empty/templates2/baseXX.html
 }}}

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30753#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.0b16a4e1c10b4a87d4717988ac45cf75%40djangoproject.com.

Reply via email to