《Django 5 By Example》閱讀筆記:p105-p164

codists發表於2024-11-16

《Django 5 By Example》學習第5天,p105-p164總結,總計60頁。

一、技術總結

1.文章標籤功能

Django自帶django-taggit。

2.自定義template tags

3.roadmap功能

4.RSS功能

5.full-text搜尋功能

這裡使用的是Postgresql,使用pip install psycopg安裝後,執行“python manage.py migarte”會報ModuleNotFoundError: No module named 'psycopg2'錯誤。應該按照文件使用pip install "psycopg[binary,pool]"進行安裝。

二、英語總結(生詞:4)

1.agnostic

p147, Although Django is a database-agnostic web framework, it provides a module that supports part of the rich feature set offered by PostgreSQL, which is not offered by other databases that Django supports.

(1)agnostic: a-("not") + *gno-("to know")。adj. neutral.

2.stem

p156, Stemming is the process of reducing words to their word stem, base, or root form.

(1)stem: *sta-("stand, be firm").

adj. central structure of plant(植物的莖幹)。這裡是一種比喻意義的用法,意為“central part of sth/fundamental part of sth (詞幹提取)”。

3.boost

p159, We can boost specific vectors so that more weight is attributed to them when ordering results by relevancy.

vt. to increase or improve sth.

4.trigram

p160, Another search approach is trigram similarity.

n. anothe term for trigraph.

三、其它

chapter 03簡評:本章介紹了一些常見的功能,但這些功能都是基於Django的admin去實現,不是很通用,本人選擇快速過一遍,瞭解有哪些庫及其用法,不做深入學習。

四、參考資料

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)

相關文章