Pointing out a template overriding pitfall
|Reported by:||Daniele Procida||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I spent a lot of time trying to work out why my own base_site.html template wasn't overriding Django's.
Eventually I realised that it was because django.contrib.admin was listed in INSTALLED_APPLICATIONS before my own application, and so its base_site.html won the race to be chosen.
I'm a slow learner, so I went through the same thing all over again today, a year or more later...
To help people like me, I have added a comment in the settings.py of the project template, and a note in the docs, in a pull request at https://github.com/django/django/pull/185
Change History (4)
comment:1 Changed 4 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|