1
我試圖自定義自動生成的django管理頁面到更私人的東西。我想在頁腳中添加文本,但到目前爲止,我嘗試過的所有內容都無法正常工作。這是html。這個嘗試就在這裏顯示的頁腳文本緊接在沒有由CSS創建的頁腳欄的內容之後。這裏的HTML:添加文本到頁腳在Django管理頁面
{% extends "admin/base.html" %}
{% load i18n %}
{% block title %}{{ title }} | {% trans 'Sunstreet Administration' %}{% endblock %}
{% block extrastyle %}
<!-- <head>
<link rel="stylesheet" href="headerfooter.css" type="text/css"/>
</head> -->
<style>
#header{ width:100%;
background-color:
#DF4F44;
border-bottom: solid 3px #999;
display: block;
background-image:url("/img/sunstreet.png") no-repeat right top; }
#branding h1{ color: #fff; }
.module h2, .module caption, .inline-group h2 { background:#ccc url(/img/admin/nav-bg.gif) bottom left repeat-x; color: #333940; }
a.section:link, a.section:visited { color: #9CA974; }
#footer h5{ position:fixed; bottom:0;
width: 100%; height:5px; background-color: #DF4F44;
border-bottom: solid 3px #999;
}
</style>
<!-- <footer class="footer">
<div class="copyright">
Copyright © 2014 LOL. All rights reserved
</div>
</footer> -->
{% endblock %}
{% block branding %}
<h1 id="site-name">{% trans 'Database' %}</h1>
{% endblock %}
{% block nav-global %}
{% endblock %}
{% block footer %}
<h5> 'Text in footer' </h5>
{% endblock %}
你去哪裏放這個模板? – neoascetic