Checkthis's Notes
2017年10月28日 星期六
Django - MTV架構筆記
MTV是Django Models, Templates, Views的縮寫
此筆記將紀錄開發Django app時的步驟
1.
import 要用的models於views.py
2.
進行query於views.py
3.
將query的結果傳到Template
4.
Template去接應Views.py的結果,如果控制流程必須要有收尾的Tag
如:{% endif %}、{% endfor %}
5.
urls.py設定路由
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言