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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 不知道你们平时读书、浏览公号,会不会碰到一个怪现象。 越是喜欢的作家写的东西,越是不舍得轻易去读。好像总要等到风和...
    念姝阅读 580评论 0 0
  • 下午接到小M打来的电话,她听上去忧心忡忡,心神不定。细问才知,是对工作环境不满意,觉得公司体制不完善,没有良好的育...
    提莉亚阅读 912评论 0 2
  • 淡淡的香飘落几许优雅,那翼化作五彩的霞,牵动着我的魂飞向你的心,蕊吐芬芳,你翩翩的身姿曼妙的舞步在天空、在云朵、绽...
    夜已空阅读 275评论 0 4
  • 其实,小白只是想说,有些罪,都是你自找的,活该! 什么是学生干部,在你没有读大学之前,可能不太真正理解,读完了大学...
    燮然阅读 484评论 1 7

友情链接更多精彩内容