首页 > 其他 > 详细

Django 模板继承extend 标签include block

时间:2019-03-10 22:49:32      阅读:258      评论:0      收藏:0      [点我收藏+]
# 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

原文:https://www.cnblogs.com/icemonkey/p/10507767.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!