In web development, a lot of the time will be the introduction of common head and tail, below I record the introduction of common head and tail in the Django template example, Novice, do not spray, there is wrong place to write, please help to point out, thank you
1, first create a common template file, paste my HTML template
#vim base.html
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title>jeff's Blog </title>
<body>
{% block content%}
{% Endblock%}
</body>
2. Introduction of base.html in other documents
{% extends ' base.html '%}
{% block content%}
{% Endblock%}
This article is from the "Jeff" blog, so be sure to keep this source http://zhangxz.blog.51cto.com/5490116/1565800
Django Python introduces a common template