摘要: django加载模板 extend block endblock views.py ##模板继承 def base_html(request): #基础模板页面 return render(request,'base_html.html') def music_html(request): retu 阅读全文
posted @ 2021-08-02 20:43 yescarf 阅读(597) 评论(0) 推荐(0) 编辑
摘要: django-标签的应用 官网链接 views def test_filter(request): dic={} dic['str']='sssqwqeqw' dic['int']=100 dic['html']='<script>alert("前路昭然你我共进")</script>' return 阅读全文
posted @ 2021-08-02 19:50 yescarf 阅读(18) 评论(0) 推荐(0) 编辑
摘要: django-for标签 for 标签内容 views.py ###test_for def test_if_for(request): dic={} dic['x']=20 dic['lst']=['zs','ls','ww'] return render(request,'test_if_for 阅读全文
posted @ 2021-08-02 14:08 yescarf 阅读(180) 评论(0) 推荐(0) 编辑