Overriding Django's admin template from a custom app
If you have tried to override an administrative template in Django using the app directories template loader functionality, you may have found yourself growing frustrated— I mean, you may have found yourself going insane.
The problem was acknowledged but
The order of INSTALLED_APPS is significant! Translations and Templates in Django can be overridden; the first app found will have priority.
Improve documentation: order in INSTALLED_APPS matters for translations and templates
https://code.djangoproject.com/ticket/20914
Furthermore...
If you are only trying to customize the title and header, there's no need to override the template nor to do the complicated customization described in the docs (which requires registering the ModelAdmin yourself)— you can place the following lines in your urls.py to override the title (in the browser bar/tab), the header, and the text for the index title, like this:
admin.site.site_header = 'Custom administration'
Comments
Post new comment