PracticalDjangoProjects 笔记四

Django is an MVC framework.The view in Django is the component which retrieves and manipulates data, whereas the template is the component that presents data to the user.

Django是个MVC 框架,或叫做MTC框架。Django中的view是获得并操纵数据的组件,反之,template是用来展现数据给用户的组件。

A view in Django terminology is a regular Python function that responds to a page request by generating the corresponding page.

在Django术语中,view就是常规的Python方法,它通过产生相应的页面来回应页面请求。

 It takes user input as a parameter, and returns page output. But before we can see the output of this view, we need to connect it to a URL

 它采用用户输入作为参数,然后返回页面输出,但是在能看到view的输出之前,我们必须把它和一个URL关联起来。

作者:Shane
出处:http://bluescorpio.cnblogs.com
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/bluescorpio/p/1639966.html