From 8d9f2f8b3f3aea9358063b26766bb2ea35dfdf36 Mon Sep 17 00:00:00 2001 From: Paul Everitt Date: Thu, 24 Jul 2008 20:25:31 +0000 Subject: More glossary, add some text to project explanation --- docs/narr/project.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'docs/narr/project.rst') diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 10a1548fd..1cfac5b1e 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -68,7 +68,7 @@ generated ``setup.py``:: Finished processing dependencies for myproject==0.1 This will install your application 's package into the interpreter so -it can be found and run under a webserver. +it can be found and run as a WSGI application inside a WSGI server. Running The Tests For Your Application -------------------------------------- @@ -241,9 +241,16 @@ the HTML given back to the browser. hop in the URL. (That data comes from the model.) The request is an instance of a WebOb request. -#. The model renders a remplate and returns the result as the +#. The model renders a template and returns the result as the response. +.. note:: + + This example uses ``render_template_to_response`` which allows the + view author to think only in terms of templates. If you want more + control over the response, use ``render_template`` and create your + own WebOb Response object to return. + ``models.py`` ~~~~~~~~~~~~~ @@ -275,9 +282,10 @@ the root. ``run.py`` ~~~~~~~~~~ -We need a small Python module that sets everything, fires up a web -server, and handles incoming requests. Later we'll see how to use a -Paste configuration file to do this work for us. +We need a small Python module that configures our application and +advertises itself to our Paste ``.ini`` file. For convenience, we +also make it possible to run this module directory without the Paste +configuration file: .. literalinclude:: myproject/myproject/run.py :linenos: -- cgit v1.2.3