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关联起来。

posted @ 2010-01-05 22:55  小楼  阅读(264)  评论(0编辑  收藏  举报