django中快捷函數render()及參數

在django文檔中render()函數的做用是載入模板,填充上下文,再返回由它生成的 HttpResponse 對象html 正常載入模版時要導入loader和HttpResponse,若是你使用了render()就不用導入前二者了,但若是你還有其餘函數須要用到它的話,就須要保持HttpResponse的導入django help文檔中描述以下: render(request, template
相關文章
相關標籤/搜索