Django Overview

How Django is Structured

Django is modeled around a Model-View-Controller (MVC) framework.

  • The Model, which provides the interface with the database containing the application data;

  • The View, which decides what information to present to the user and collects information from the user;

  • The Controller, which manages the business logic for the application and acts as an information broker between the model and the view.

Django uses slightly different terminology in its implementation of MVC :
Model-Template-View (MTV)

M-T-V

MTV

  • Model
    Django’s models provide an Object-relational Mapping (ORM) to the underlying database.

  • Template
    A Django template is a text file designed to separate an application’s data from the way it is presented.

  • View
    Django’s views are the information brokers of a Django application. A view sources data from your database (or an external data source or service) and delivers it to a template.

read more

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 不知道你們平時(shí)讀書、瀏覽公號,會(huì)不會(huì)碰到一個(gè)怪現(xiàn)象。 越是喜歡的作家寫的東西,越是不舍得輕易去讀。好像總要等到風(fēng)和...
    念姝閱讀 593評論 0 0
  • 下午接到小M打來的電話,她聽上去憂心忡忡,心神不定。細(xì)問才知,是對工作環(huán)境不滿意,覺得公司體制不完善,沒有良好的育...
    提莉亞閱讀 919評論 0 2
  • 淡淡的香飄落幾許優(yōu)雅,那翼化作五彩的霞,牽動(dòng)著我的魂飛向你的心,蕊吐芬芳,你翩翩的身姿曼妙的舞步在天空、在云朵、綻...
    夜已空閱讀 276評論 0 4
  • 其實(shí),小白只是想說,有些罪,都是你自找的,活該! 什么是學(xué)生干部,在你沒有讀大學(xué)之前,可能不太真正理解,讀完了大學(xué)...
    燮然閱讀 484評論 1 7

友情鏈接更多精彩內(nèi)容