标签:jquer nmon text class charset css title lang block
###
conmon.html
body{
margin: 0;
}
###
master.htm
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>{% block title%}ttt{% endblock %}</title> <link rel="stylesheet" href="/static/conmon.css"/> <style> .ph-head{ background-color: green; height: 100px; } </style> {% block css%} {% endblock %} </head> <body> <div class="ph-head">123</div> <div> {% block content %} {% endblock %} </div> <script src="/static/jquery-3.2.1.js"></script> #js文件需要自己导入 {% block js%} {% endblock %} </body> </html>
###
t2.html
<form> <input type="text"/> <input type="submit"/> </form>
###
###
t1.html
{% extends ‘master.html‘ %} ###继承父模板 {% block title %}lws{% endblock %} {% block css%} <style> body{ background-color: darkblue; } </style> {% endblock %} {% block content %} <ul> {% for row in User_list %} <li>{{ row }}</li> {% endfor %} </ul> {% endblock %} {% block js%} <script> alert(123) </script> {% endblock %}
###
标签:jquer nmon text class charset css title lang block
原文地址:http://www.cnblogs.com/lwsup/p/7503001.html