Sophie

Sophie

distrib > Fedora > 14 > i386 > media > os > by-pkgid > 5c4f8358fd6fdc210fb0d926bd25802c > files > 263

python-werkzeug-doc-0.6.2-2.fc14.noarch.rpm


<!DOCTYPE HTML>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Werkzeug Documentation</title>
    <link rel="stylesheet" href="_static/style.css" type="text/css">
    <link rel="stylesheet" href="_static/print.css" type="text/css" media="print">
    <link rel="stylesheet" href="_static/pygments.css" type="text/css">
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:   '#',
        VERSION:    '0.6.1'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/interface.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/werkzeug.js"></script>
    <link rel="contents" title="Global table of contents" href="contents.html">
    <link rel="index" title="Global index" href="genindex.html">
    <link rel="search" title="Search" href="search.html">
    <link rel="top" title="Werkzeug v0.6.1 documentation" href="index.html">
    <link rel="next" title="Unicode" href="unicode.html">
    <link rel="prev" title="Lint Validation Middleware" href="contrib/lint.html">
    
  </head>
  <body>
    <div class="page">
      <div class="header">
        <h1 class="heading"><a href="index.html"
          title="back to the documentation overview"><span>Werkzeug</span></a></h1>
      </div>
      <ul class="navigation">
        <li class="indexlink"><a href="index.html">Overview</a></li>
        <li><a href="contrib/lint.html">&laquo; Lint Validation Middleware</a></li>
        <li class="active"><a href="#">Important Terms</a></li>
        <li><a href="unicode.html">Unicode &raquo;</a></li>
      </ul>
      <div class="body">
        <div id="toc">
          <h3>Table Of Contents</h3>
          <div class="inner"><ul>
<li><a class="reference external" href="#">Important Terms</a><ul>
<li><a class="reference external" href="#wsgi">WSGI</a></li>
<li><a class="reference external" href="#response-object">Response Object</a></li>
<li><a class="reference external" href="#view-function">View Function</a></li>
</ul>
</li>
</ul>
</div>
        </div>
        
  <div class="section" id="module-werkzeug">
<span id="important-terms"></span><h1>Important Terms<a class="headerlink" href="#module-werkzeug" title="Permalink to this headline">¶</a></h1>
<p>This page covers important terms used in the documentation and Werkzeug
itself.</p>
<div class="section" id="wsgi">
<h2>WSGI<a class="headerlink" href="#wsgi" title="Permalink to this headline">¶</a></h2>
<p>WSGI a specification for Python web applications Werkzeug follows.  It was
specified in the <span class="target" id="index-0"></span><a class="pep reference external" href="http://www.python.org/dev/peps/pep-0333"><strong>PEP 333</strong></a> and is widely supported.  Unlike previous solutions
it gurantees that web applications, servers and utilties can work together.</p>
</div>
<div class="section" id="response-object">
<h2>Response Object<a class="headerlink" href="#response-object" title="Permalink to this headline">¶</a></h2>
<p>For Werkzeug, a response object is an object that works like a WSGI
application but does not do any request processing.  Usually you have a view
function or controller method that processes the request and assambles a
response object.</p>
<p>A response object is <em>not</em> necessarily the <a title="werkzeug.BaseResponse" class="reference external" href="wrappers.html#werkzeug.BaseResponse"><tt class="xref py py-class docutils literal"><span class="pre">BaseResponse</span></tt></a> object or a
subclass thereof.</p>
<p>For example Pylons/webob provide a very similar response class that can
be used as well (<a title="(in Pylons v0.9.7)" class="reference external" href="http://pylonshq.com/docs/en/0.9.7/thirdparty/webob/#webob.Response"><tt class="xref py py-class docutils literal"><span class="pre">webob.Response</span></tt></a>).</p>
</div>
<div class="section" id="view-function">
<h2>View Function<a class="headerlink" href="#view-function" title="Permalink to this headline">¶</a></h2>
<p>Often people speak of MVC (Model, View, Controller) when developing web
applications.  However, the Django framework coined MTV (Model, Template,
View) which basically means the same but reduces the concept to the data
model, a function that processes data from the request and the database and
renders a template.</p>
<p>Werkzeug itself does not tell you how you should develop applications, but the
documentation often speaks of view functions that work roughly the same.  The
idea of a view function is that it&#8217;s called with a request object (and
optionally some parameters from an URL rule) and returns a response object.</p>
</div>
</div>


        <div style="clear: both"></div>
      </div>
      <div class="footer">
        © Copyright 2008 by the <a href="http://pocoo.org/">Pocoo Team</a>,
        documentation generated by <a href="http://sphinx.pocoo.org/">Sphinx</a>
      </div>
    </div>
  </body>
</html>