- Django Design Patterns and Best Practices
- Arun Ravindran
- 150字
- 2021-06-25 21:32:01
Python Zen and Django's design philosophy
Generally, the Python community uses the term Pythonic to describe a piece of idiomatic code. It typically refers to the principles laid out in The Zen of Python. Written like a poem, it is extremely useful to describe such a vague concept.
Try entering import this in a Python prompt to view The Zen of Python.
Furthermore, Django developers have crisply documented their design philosophies while designing the framework at https://docs.djangoproject.com/en/dev/misc/design-philosophies/.
While the document describes the thought process behind how Django was designed, it is also useful for developers using Django to build applications. Certain principles such as Don't Repeat Yourself (DRY), loose coupling, and tight cohesion can help you write more maintainable and idiomatic Django applications.
Django or Python best practices suggested by this book would be formatted in the following manner:
Use BASE_DIR in settings.py and avoid hardcoding directory names.
- 計算機網絡
- 程序員面試白皮書
- Java異步編程實戰
- MySQL 8從入門到精通(視頻教學版)
- jQuery從入門到精通 (軟件開發視頻大講堂)
- Flash CS6中文版應用教程(第三版)
- C#程序設計
- Hands-On Functional Programming with TypeScript
- C語言程序設計教程
- 利用Python進行數據分析
- Hands-On GUI Programming with C++ and Qt5
- Flowable流程引擎實戰
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Python一行流:像專家一樣寫代碼
- Clojure Web Development Essentials