Reputation: 33
On my django site I tried unsuccesfully to change the color and a little of CSS of the header bar in the django admin site. I don't want to change anything else.
The template I currently have:
{% extends "admin/base_site.html" %}
{% block extrastyle %}
<style>
#header{ background-color: #a67d3d; border-bottom: solid 3px #f5deb3; }
</style>
{% endblock %}
This modifies the colors but makes the rest of the content blank. Navigating through the urls I managed to go beyond the main screen only to find the base colors (the blue I'm trying to change) and everything else working.
I also tried using: {% extends "admin/base.html" %}
to no avail.
Is there a way to do this without creating a completly new Admin instance?
Upvotes: 1
Views: 1614
Reputation: 9977
This probably as to do with the fact that your override code is not at the right place. So,
templates
admin
base_site.html
and add your codeSo, the code you posted in your question should reside in,
YourProject/templates/admin/base_site.html
Then, the override should appear correclty.
Upvotes: 2