Django Architecture Introduction

Software Development Engineer - Netease Games at Netease Games
Dec. 11, 2014
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
Django Architecture Introduction
1 of 24

More Related Content

What's hot

Django for BeginnersDjango for Beginners
Django for BeginnersJason Davies
Python & Django TTTPython & Django TTT
Python & Django TTTkevinvw
Web development with django - Basics PresentationWeb development with django - Basics Presentation
Web development with django - Basics PresentationShrinath Shenoy
Introduction to DjangoIntroduction to Django
Introduction to DjangoJames Casey
Django by rjDjango by rj
Django by rjShree M.L.Kakadiya MCA mahila college, Amreli
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial之宇 趙

Similar to Django Architecture Introduction

بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگوrailsbootcamp
Django framework Django framework
Django framework TIB Academy
How to Webpack your Django!How to Webpack your Django!
How to Webpack your Django!David Gibbons
Akash rajguru project report sem vAkash rajguru project report sem v
Akash rajguru project report sem vAkash Rajguru
DjangoDjango
DjangoHarmeet Lamba
Django rest frameworkDjango rest framework
Django rest frameworkBlank Chen

Recently uploaded

Expo - Zero to App.pptxExpo - Zero to App.pptx
Expo - Zero to App.pptx😎 Anthony Kariuki
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...Workflow Engines & Event Streaming Brokers - Can they work together? [Current...
Workflow Engines & Event Streaming Brokers - Can they work together? [Current...Natan Silnitsky
Road to NODES 2023: Graphing Relational DatabasesRoad to NODES 2023: Graphing Relational Databases
Road to NODES 2023: Graphing Relational DatabasesNeo4j
COA.pptxCOA.pptx
COA.pptxGoluTiwari22
Salesforce @AXA.pdfSalesforce @AXA.pdf
Salesforce @AXA.pdfPatrickYANG48
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...
[DPE Summit] How Improving the Testing Experience Goes Beyond Quality: A Deve...Roberto Pérez Alcolea

Recently uploaded(20)

Django Architecture Introduction

Editor's Notes

  1. HTTP(超文本传输协议)封装了Web页面服务的整个过程,是Web的基石.由两部分组成,请求和响应. 请求封装了第一部分,核心是URL(指向所需文档路径,同样对于服务器而言就是路由) 响应由一个正文和相应的包头(header)组成. 静态请求与动态请求, Web大部分的动态特性都是通过将数据保存在数据库中实现的. 大部分Web框架都提供了模板语言(template language, 例如Django内置模板, jinjia)来处理要显示的数据, 它混合了原始的HTML标签以及一些类似编程的语法来循环对象集合,执行逻辑操作和一些动态所需的结构。
  2. 模型层与MVC中的M相一致,然后Django里的视图却并不是显示数据的最后一步---Django中的视图其实更加接近于MVC传统意义上的控制器. 它们是用来将模型层与表示层连接在一起的python函数.按照Django团队的话来说:视图描述的是你能看到哪些数据,而不是怎么看到它. 换一种说法,Django把表示层一分为二,视图方法定义了显示模型里的什么数据,而模板则定义了最终的现实方式.而框架自身则担当起控制器的角色, 它提供决定什么视图和什么模板一起响应给定请求的机制. 视图(View)组成了django应用程序大部分甚至全部的逻辑.它们是链接到一个或多个定义URL上的python函数,这些函数都返回一个HTTP响应对象. 在Django的HTTP机制之间要执行什么操作完全在你的掌控之中。 当一个视图要返回HTML文档时,它通常会制定一个模板,提供它所要显示的信息,并在响应里使用模板渲染结果.返回格式不仅仅是HTML。
  3. 模型层与MVC中的M相一致,然后Django里的视图却并不是显示数据的最后一步---Django中的视图其实更加接近于MVC传统意义上的控制器. 它们是用来将模型层与表示层连接在一起的python函数.按照Django团队的话来说:视图描述的是你能看到哪些数据,而不是怎么看到它. 换一种说法,Django把表示层一分为二,视图方法定义了显示模型里的什么数据,而模板则定义了最终的现实方式.而框架自身则担当起控制器的角色, 它提供决定什么视图和什么模板一起响应给定请求的机制. 视图(View)组成了django应用程序大部分甚至全部的逻辑.它们是链接到一个或多个定义URL上的python函数,这些函数都返回一个HTTP响应对象. 在Django的HTTP机制之间要执行什么操作完全在你的掌控之中。 当一个视图要返回HTML文档时,它通常会制定一个模板,提供它所要显示的信息,并在响应里使用模板渲染结果.返回格式不仅仅是HTML。
  4. 利用Django中间件,我们可以做许多自定义的操作.例如Session控制,用户登陆验证,安全措施防范,特定异常处理等等.