模板之导入include

include导入模板

<form>
    <input type="text">
    <input type="submit">
</form>

 

{% extends 'master.html' %}

{% block title %}你猜{% endblock %}
{% block content %}
    <h1>用户管理</h1>
    <ul>
        {% for i in u %}
             <li>{{ i }}</li>
        {% endfor %}



    </ul>
    {% include 'tag.html' %}
    {% include 'tag.html' %}
    {% include 'tag.html' %}
{% endblock %}

 

上一篇:三范式


下一篇:Django笔记&教程 3-4 模板继承