《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)

相关推荐
u0109147604 分钟前
C#怎么使用TopLevel顶级语句 C#顶级语句怎么写如何省略Main方法简化控制台程序【语法】
jvm·数据库·python
独隅6 分钟前
PyTorch转TFLite动态形状处理技巧
人工智能·pytorch·python
Shorasul14 分钟前
Go语言goroutine调度原理_Go语言GMP调度模型教程【高效】
jvm·数据库·python
Absurd58716 分钟前
Navicat导出JSON数据为空如何解决_过滤条件与权限排查
jvm·数据库·python
m0_7164300718 分钟前
SQL如何高效统计分类下的多项指标_善用CASE WHEN与SUM聚合
jvm·数据库·python
m0_5887584819 分钟前
PHP源码运行受主板供电影响吗_供电相数重要性说明【技巧】
jvm·数据库·python
qq_4138474021 分钟前
如何处理MongoDB跨分片事务报错_4.2+分布式事务的限制与两阶段提交延迟
jvm·数据库·python
InfinteJustice22 分钟前
HTML函数在超频CPU上更流畅吗_超频对HTML函数影响【技巧】
jvm·数据库·python
心易行者22 分钟前
代码写好了,然后呢?——手把手教你把Python脚本变成能赚钱的Web应用
开发语言·前端·python
站大爷IP26 分钟前
Python 秒杀系统实战:库存预扣 + 防超卖 极致优化实现
python