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

相关推荐
清水白石00820 分钟前
突破并行瓶颈:Python 多进程开销全解析与 IPC 优化实战
开发语言·网络·python
Lupino2 小时前
IoT 平台可编程化:基于 Pydantic Monty 构建工业级智能自动化链路
python
清水白石0083 小时前
突破性能瓶颈:深度解析 Numba 如何让 Python 飙到 C 语言的速度
开发语言·python
yunhuibin4 小时前
AlexNet网络学习
人工智能·python·深度学习·神经网络
喵手5 小时前
Python爬虫实战:增量爬虫实战 - 利用 HTTP 缓存机制实现“极致减负”(附CSV导出 + SQLite持久化存储)!
爬虫·python·爬虫实战·零基础python爬虫教学·增量爬虫·http缓存机制·极致减负
一个处女座的程序猿O(∩_∩)O5 小时前
Python异常处理完全指南:KeyError、TypeError、ValueError深度解析
开发语言·python
was1725 小时前
使用 Python 脚本一键上传图片到兰空图床并自动复制链接
python·api上传·自建图床·一键脚本
好学且牛逼的马6 小时前
从“Oak”到“虚拟线程”:JDK 1.0到25演进全记录与核心知识点详解a
java·开发语言·python
shangjian0076 小时前
Python基础-环境安装-Anaconda配置虚拟环境
开发语言·python
codeJinger6 小时前
【Python】函数
开发语言·python