5
- First if you have set
DEBUG = True
django automatically gives you information about where django was looking for templates (in general and especially in case it didnโt find one)
You should see something like this:
- second you can add the popular django plugin django-debug-toolbar. It can show you for each request what templates were used and what their context was.
see: https://django-debug-toolbar.readthedocs.io/en/stable/panels.html#template
2
Still, not exactly the answer, but something to get me closer. One could start Django shell, and then try this:
>>> from django.template.loader import get_template
>>> get_template('template/name').origin.name
to find out what template was actually used. This is still not enough to see though which templates were considered while resolving the template.
- [Django]-How to add all foreign key relations in Django?
- [Django]-Don't include blank fields in GET request emitted by Django form
- [Django]-Django ModelForm initial or custom field value
- [Django]-Heroku created table but when I'll migrate, he says that doesn't created
- [Django]-Django-tables2 checkbox column name
Source:stackexchange.com