Python@TW: 會眾| IRC| Planet| 郵件列表| 聯絡我們
修訂版 1 和 8 的差異如下: (間隔 7 版)
2007-02-23 00:40:16 修訂第 1 版
大小: 440
編輯者: timchen119
說明:
2012-01-05 20:44:15 修訂第 8 版
大小: 2763
編輯者: keitheis
說明: 加入 How I Write Django Reusable Apps 參考
這個顏色代表刪除的 這個顏色代表增加的
行號 1: 行號 1:
官方網站: http://www.djangoproject.com/ == Django 資料 ==
行號 3: 行號 3:
["Django"]是["Python"]一種整合性的Web開發框架。  * 官方網站:[[http://www.djangoproject.com/|http://www.djangoproject.com/|target="_blank"]]
 * 發音:/ˈdʒæŋɡoʊ/ jang-goh,[[http://blog.ianbicking.org/2007/08/02/pronouncing-django/|d 不發音|target="_blank"]]
行號 5: 行號 6:
架構是屬於接近MVC的架構,但名稱上略有不同。 == 簡介 ==

「Django 是一個開放原始碼的 Web 應用框架,由 Python 寫成。採用了 MVC 的軟體設計模式,即模型 M,視圖 V 和控制器 C。... 主要目標是使得開發複雜、資料庫驅動的網站變得簡單。它注重組件的重用性和「可插拔性」,敏捷開發和 DRY 法則(Don't Repeat Yourself)。」~謫自[[http://zh.wikipedia.org/zh-tw/Django|Wikipedia 上的 Django 條目|target="_target"]]的簡介。

雖然 Django 架構是屬於接近 MVC 的架構,但名稱上略有不同。
行號 12: 行號 17:
目前在Python的Web開發圈裡被大幅運用。 目前在 Python  Web 開發圈裡被大幅運用。
行號 14: 行號 19:
經常被拿來與["RubyOnRails"]和["TurboGears"]作比較。 經常被拿來與 [[RubyOnRails]] 和 [[Pylons Project]] 作比較。
== 外部參考資源 ==

 * [[http://blog.eddie.com.tw/2011/10/14/django-introduction/|Django簡介|target="_blank"]] by 高見龍,2011.10 註:該格落格有[[http://blog.eddie.com.tw/category/django/|一系列的 Django 文|target="_blank"]]可參考。
 * [[http://blog.ericsk.org/archives/815|用 Python + django 10分鐘內作出一個 blog|target="_blank"]] by Eric Shangkuan,2007
 * [[http://tech.seety.org/python/django_tossug_present.html|Django, how to start|target="_blank"]] by [[yungyun]],2006
 * [[http://www.openfoundry.org/tw/tech-column/8564-python-django-on-heroku|Python/Django on Heroku|target="_blank"]] by 小梅,2012.01 註:直接上雲端的佈署文。

=== 進階技巧 ===
 * [[http://paltman.com/2011/12/31/how-i-write-django-reusable-apps/|How I Write Django Reusable Apps|target="_blank"]] by Patrick Altman,2012.12.31
  "A sort of a pattern has developed as I have learned little bits from trial and error so I thought I'd capture them in a single post as they might be useful for other app authors.
  In summary they are:
    * Start with a Real Project
    * Provide Signals
    * Properly Package and Document Your App
    * Maintain a CHANGELOG
    * Provide injection points in Views

 * [[http://www.caktusgroup.com/blog/2011/12/29/class-based-views-django-13/|Class-based views in Django 1.3|target="_blank"]] by Dan Poirier,2011.12.29
  "A more powerful use of the new class-based views is to provide common function for many views. If you have a site with many views, and they all inherit from a common view, then you have the potential to change behavior across the site by changing that one view."

Django 資料

簡介

「Django 是一個開放原始碼的 Web 應用框架,由 Python 寫成。採用了 MVC 的軟體設計模式,即模型 M,視圖 V 和控制器 C。... 主要目標是使得開發複雜、資料庫驅動的網站變得簡單。它注重組件的重用性和「可插拔性」,敏捷開發和 DRY 法則(Don't Repeat Yourself)。」~謫自Wikipedia 上的 Django 條目的簡介。

雖然 Django 架構是屬於接近 MVC 的架構,但名稱上略有不同。

傳統

Django

Model

Model

View

Template

Controller

View

目前在 Python 的 Web 開發圈裡被大幅運用。

經常被拿來與 RubyOnRailsPylons Project 作比較。

外部參考資源

進階技巧

  • How I Write Django Reusable Apps by Patrick Altman,2012.12.31

    • "A sort of a pattern has developed as I have learned little bits from trial and error so I thought I'd capture them in a single post as they might be useful for other app authors. In summary they are:
      • Start with a Real Project
      • Provide Signals
      • Properly Package and Document Your App
      • Maintain a CHANGELOG
      • Provide injection points in Views
  • Class-based views in Django 1.3 by Dan Poirier,2011.12.29

    • "A more powerful use of the new class-based views is to provide common function for many views. If you have a site with many views, and they all inherit from a common view, then you have the potential to change behavior across the site by changing that one view."

Django (上次是 163 在 2017-06-19 12:45:26 編輯的)