Opened 5 years ago
Last modified 5 years ago
#30753 closed New feature
Add 'Did you mean...' when TemplateDoesNotExist occurs — at Version 2
Reported by: | Min ho Kim | Owned by: | Min ho Kim |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | yes |
Description (last modified by )
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
Change History (5)
comment:1 by , 5 years ago
Owner: | changed from | to
---|
by , 5 years ago
Attachment: | Screen Shot 2019-09-03 at 21.53.38.png added |
---|
by , 5 years ago
Attachment: | Proposed outcome.png added |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
by , 5 years ago
Attachment: | Proposed outcome multiple templates.png added |
---|
Note:
See TracTickets
for help on using tickets.
Proposed outcome