1、在settings.py中配置 STATICFILES_DIRS=os.path.join(BASE_DIR,static)使用:{% static css/index.css %}

3、然后在settings.py 下添加模板

5、构建response对象

7、循环

9、转义默认django中是把自动转义打开,如果需要关闭自动转义,{% autoescape off %}{% endautoescape %}{% autoescape on %}{% endautoescape %}静态资源在模板的顶部添加{% load static %}继承与block

10、同名的{% block content %} 子模板自定的内容 {% endblock %}包含{% include "footer.html" %} 把制定的模板内容添加到当前模板中。