Pointing out a template overriding pitfall
|Reported by:||EvilDMP||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 3 years ago by aaugustin
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted
comment:2 Changed 3 years ago by Aymeric Augustin <aymeric.augustin@…>
- Resolution set to fixed
- Status changed from new to closed