django模板-if標籤、for標籤、自定義標籤和過濾器

一、標籤 在django中,標籤寫在{%  標籤  %}中 1.if else標籤 ①通過if進行條件判斷 from django.shortcuts import render def index(request): context={'age':18} return render(request,'index.html',context=context) …… <body>
相關文章
相關標籤/搜索