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

相关推荐
2301_77563989几秒前
mysql升级时如何使用Ansible进行自动化部署_mysql自动化管理
jvm·数据库·python
CLX050515 分钟前
怎样设置外键的更新级联操作_ON UPDATE CASCADE配置
jvm·数据库·python
Gerardisite17 分钟前
企微批量群发消息指南:用 QiWe 省掉人工操作
java·python·机器人·企业微信
zjy2777732 分钟前
SQL Server如何实现编写表与字段注释_Navicat兼容操作步骤
jvm·数据库·python
m0_7020365337 分钟前
CSS移动端实现响应式导航菜单_利用媒体查询切换显示隐藏状态
jvm·数据库·python
m0_5967490940 分钟前
Go语言怎么用Jaeger_Go语言Jaeger链路追踪教程【实用】
jvm·数据库·python
2501_9010064740 分钟前
Golang Gin如何定义路由和路由组_Golang Gin路由教程【实用】
jvm·数据库·python
斯班奇的好朋友阿法法1 小时前
联调注意事项清单
django
m0_463672201 小时前
golang如何实现群聊功能_golang群聊功能实现策略
jvm·数据库·python
_376271531 小时前
如何利用 Provide 注入 API 实例?解决组件库依赖全局接口痛点
jvm·数据库·python