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

相关推荐
nightunderblackcat1 小时前
新手向:Python制作贪吃蛇游戏(Pygame)
python·游戏·pygame
flysh052 小时前
pyAutoGUI 模块主要功能介绍-(1)鼠标功能
python·计算机外设·鼠标控制
励志不掉头发的内向程序员3 小时前
从零开始的python学习——文件
开发语言·python·学习
THMAIL3 小时前
量化基金从小白到大师 - 金融数据获取大全:从免费API到Tick级数据实战指南
人工智能·python·深度学习·算法·机器学习·金融·kafka
代码欢乐豆4 小时前
scikit-learn零基础配置(含python、anaconda)
python·机器学习·scikit-learn
Java水解4 小时前
Python数据库操作:SQLAlchemy ORM指南
python
悠哉悠哉愿意4 小时前
【数学建模学习笔记】无监督聚类模型:分层聚类
笔记·python·学习·数学建模
eleqi4 小时前
Python+DRVT 从外部调用 Revit:批量创建门
python·系统集成·bim·revit·drvt·自动生产流水线
先做个垃圾出来………4 小时前
PyTorch 模型文件介绍
人工智能·pytorch·python
浅醉樱花雨4 小时前
vosk语音识别实战
人工智能·python·语音识别·asr·vosk