- Django 2 by Example
- Antonio Melé
- 110字
- 2021-06-25 21:19:02
Building list and detail views
Now that you have knowledge of how to use the ORM, you are ready to build the views of the blog application. A Django view is just a Python function that receives a web request and returns a web response. All the logic to return the desired response goes inside the view.
First, we will create our application views, then we will define a URL pattern for each view, and finally, we will create HTML templates to render the data generated by the views. Each view will render a template passing variables to it and will return an HTTP response with the rendered output.
推薦閱讀
- 智慧城市:大數據、互聯網時代的城市治理(第4版)
- 物聯網(IoT)基礎:網絡技術+協議+用例
- 網管員典藏書架:網絡管理與運維實戰寶典
- Learning QGIS 2.0
- HCNA網絡技術
- 物聯網概論(第2版)
- 網絡安全技術與解決方案(修訂版)
- 互聯網安全的40個智慧洞見:2014年中國互聯網安全大會文集
- React:Cross-Platform Application Development with React Native
- Yii Application Development Cookbook(Second Edition)
- Spring 5.0 Projects
- Building Web Applications with ArcGIS
- 網絡安全應急響應技術實戰指南
- 物聯網工程概論
- 智慧城市中的物聯網技術