《Django 5 By Example》阅读笔记:p561-p613

《Django 5 By Example》学习第 21 天,p561-p613 总结,总计 53 页。

一、技术总结

1.mixins

(1)定义(什么是 mixins?)

p570,Mixins are a special kind of multiple inheritance for a class.

(2)适用场景(为什么使用?)

1)You want to provide multiple optional features for a class

2)You want to use a particular feature in several classes

2.permission

书中是基于 Django 自带的用户组进行控制, 在 admin 网站进行设置。从我个人的角度来说,实际业务中依赖于 admin 去操作,我不是很认同这种做法。

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

1.conserve

(1)conserve: con-("to") + servare("keep watch, maintain")

vt. to keep safe, preserve from loss or decay(保护,节省)。p607, caching helps conserve computing power and reduces the need to query the database each time students access the same materials(缓存有助于节省计算能力,并减少学生每次访问相同材料时查询数据库的需要)。

三、其它

我想自己之所以不喜欢这本书其中一个原因就是作者先"哐哐哐"一顿猛击键盘,最后才给我展示界面。可是我不看界面怎么知道你要开发什么呢?我觉得这本书在这点上顺序弄反了。

四、参考资料

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)

相关推荐
FishCoderh17 小时前
Python自动化办公实战:批量重命名文件,告别手动操作
python
躺平大鹅17 小时前
Python函数入门详解(定义+调用+参数)
python
曲幽18 小时前
我用FastAPI接ollama大模型,差点被asyncio整崩溃(附对话窗口实战)
python·fastapi·web·async·httpx·asyncio·ollama
两万五千个小时21 小时前
落地实现 Anthropic Multi-Agent Research System
人工智能·python·架构
哈里谢顿1 天前
Python 高并发服务限流终极方案:从原理到生产落地(2026 实战指南)
python
用户8356290780512 天前
无需 Office:Python 批量转换 PPT 为图片
后端·python
markfeng82 天前
Python+Django+H5+MySQL项目搭建
python·django
GinoWi2 天前
Chapter 2 - Python中的变量和简单的数据类型
python
JordanHaidee2 天前
Python 中 `if x:` 到底在判断什么?
后端·python
ServBay2 天前
10分钟彻底终结冗长代码,Python f-string 让你重获编程自由
后端·python