W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
This page covers important terms used in the documentation and Werkzeugitself.
WSGI a specification for Python web applications Werkzeug follows. It wasspecified in the PEP 333 [http://www.python.org/dev/peps/pep-0333] and is widely supported. Unlike previous solutionsit gurantees that web applications, servers and utilties can work together.
For Werkzeug, a response object is an object that works like a WSGIapplication but does not do any request processing. Usually you have a viewfunction or controller method that processes the request and assambles aresponse object.
A response object is not necessarily the BaseResponse object or asubclass thereof.
For example Pylons/webob provide a very similar response class that canbe used as well (webob.Response).
Often people speak of MVC (Model, View, Controller) when developing webapplications. However, the Django framework coined MTV (Model, Template,View) which basically means the same but reduces the concept to the datamodel, a function that processes data from the request and the database andrenders a template.
Werkzeug itself does not tell you how you should develop applications, but thedocumentation often speaks of view functions that work roughly the same. Theidea of a view function is that it's called with a request object (andoptionally some parameters from an URL rule) and returns a response object.
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: