Django模板引擎是什么意思
1、在settings.py中配置 STATICFILES_DIRS=os.path.join(BASE_DIR,static)使用:{% static css/index.css %}

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

5、构建response对象

7、循环

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

10、同名的{% block content %} 子模板自定的内容 {% endblock %}包含{% include "footer.html" %} 把制定的模板内容添加到当前模板中。
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:69
阅读量:22
阅读量:48
阅读量:43
阅读量:70