# block 站网页位置
# includ 导入网页标签
# extends 导入网页模板
# common_js.html <script src="/static/plugins/jquery.min.js"> # footer.html <hr> <p>Thanks for visiting my site.</p> #base.html 母版 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en"> <head> {% block title %}母版标题{% endblock %} {% include "common_js.html" %} </head> <body> {% block contend %}{% endblock %} {% include "footer.html" %} </body> </html> #index.html {% extends "base.html" %} {% block title %}网站首页{% endblock %} {% block content %} welcome to my index page ! {% endblock %}
本站文章如无特殊说明,均为本站原创,如若转载,请注明出处:Django 模板继承extend 标签include block - Python技术站