《Django 5 By Example》阅读笔记:p17-p53

《Django 5 By Example》学习第2天,p17-p53总结,总计37页。

一、技术总结

1.数据库迁移

python manage.py makemigrations blog

python manage.py sqlmigrate blog 0001

python manage.py migrate

2.ORM

Django自带ORM。

3.view

(1)定义

p42, A Django view is just a Python function that receives a web request and returns a web response.

4.template

了解 tag, variable, filter即可,不是很理解为什么作者花那么多篇幅介绍。在实际开发中,前后端后前端多使用Vue或者React进行开发,而不是使用Django自带的模板。

二、英语总结(生词:2)

1.facet

p32, Django 5.0 introduces facet filters to the administration site, showcasing facet counts.

(1)facet:face("face, appearance")。

c. one side of a multi-sided object.本意多面物体(例如钻石)的某一面,在这里表示"a specific aspect of information"或者"a specific dimension of information".

(2)show vs showcase

show表示"to present sth in a straightforward way",而showcase强调"to present sth in a way that highlight its best qualities."。

2.sake

p51, This schema doesn't include Django middleware, for the sake of simplicity.

u.purpose or reason. for the sake of = because of。

三、其它

完成chapter 01阅读,总体来说跟着书上的代码敲可以保证代码能够正常运行,但引入新的概念的时候缺乏连接性,容易导致读者看完了,也敲完了,但容易忘了。

四、参考资料

1. 编程

(1) Antonio Melé,《Django 5 By Example》:https://book.douban.com/subject/37007362/

2. 英语

(1) Etymology Dictionary:https://www.etymonline.com

(2) Cambridge Dictionary:https://dictionary.cambridge.org

欢迎搜索及关注:编程人(a_codists)

相关推荐
nbsaas-boot2 小时前
Java 正则表达式白皮书:语法详解、工程实践与常用表达式库
开发语言·python·mysql
仗剑_走天涯2 小时前
基于pytorch.nn模块实现线性模型
人工智能·pytorch·python·深度学习
chao_7892 小时前
二分查找篇——搜索旋转排序数组【LeetCode】两次二分查找
开发语言·数据结构·python·算法·leetcode
chao_7896 小时前
二分查找篇——搜索旋转排序数组【LeetCode】一次二分查找
数据结构·python·算法·leetcode·二分查找
烛阴7 小时前
Python装饰器解除:如何让被装饰的函数重获自由?
前端·python
noravinsc7 小时前
django 一个表中包括id和parentid,如何通过parentid找到全部父爷id
python·django·sqlite
ajassi20007 小时前
开源 python 应用 开发(三)python语法介绍
linux·python·开源·自动化
沉默媛8 小时前
如何安装python以及jupyter notebook
开发语言·python·jupyter
Deng9452013149 小时前
基于Python的旅游数据可视化应用
python·numpy·pandas·旅游·数据可视化技术
2401_878624799 小时前
pytorch 自动微分
人工智能·pytorch·python·机器学习