Django 1.8 admin navigation color -
using django 1.8 how change blue navigation bar on admin interface. don't want change else, change nav bar color.
thanks
well, have little bit of work.
option 1
create admin folder in static folder in app. inside static folder, create css , img folders.
in site-packages/contrib/admin/static/css folder, copy base.css file. can modify , attributes want in here.
you need copy img files want modify site-packages/django/admin/static/img - see css snippet below
line 498:
.module h2, .module caption, .inline-group h2 { margin: 0; padding: 2px 5px 3px 5px; font-size: 11px; text-align: left; font-weight: bold; background: #7ca0c7 url(../img/default-bg.gif) top left repeat-x; color: #fff; } line 784:
#header { width: 100%; background: #417690; color: #ffc; overflow: hidden; } seem hold values want modify. have copy entire file , change values want changed. file replace 1 have when run:
./manage.py collectstatic this collect static files every app folder , place them in top level static folder.
option 2
you can copy base.html template django/contrib/admin/templates folder yourapp/templates/admin folder , keep same name. @ top of file, can add own css file load after:
<link rel="stylesheet" type="text/css" href="{% block stylesheet %}{% static "admin/css/base.css" %}{% endblock %}" /> it load template instead of base.html in site package , have similar effect.
Comments
Post a Comment