From 8b1f6e5ed3f9fc32b5eb03257d24eaf754a797a9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 9 Dec 2009 00:34:50 +0000 Subject: - General documentation freshening which takes imperative configuration into account in more places and uses glossary references more liberally. --- repoze/bfg/wsgi.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'repoze/bfg/wsgi.py') diff --git a/repoze/bfg/wsgi.py b/repoze/bfg/wsgi.py index 10d067901..26229836a 100644 --- a/repoze/bfg/wsgi.py +++ b/repoze/bfg/wsgi.py @@ -8,7 +8,7 @@ def wsgiapp(wrapped): WSGI environment *are not* performed before the application is invoked. - E.g.:: + E.g., the following in a ``views.py`` module:: @wsgiapp def hello_world(environ, start_response): @@ -17,14 +17,18 @@ def wsgiapp(wrapped): ('Content-Length', len(body)) ] ) return [body] - Allows the following view declaration to be made:: + Allows the following ZCML view declaration to be made:: + Or the following :term:`Configurator` ``add_view`` method call:: + + from views import hello_world + config.add_view(hello_world, name='hello_world.txt') + The wsgiapp decorator will convert the result of the WSGI application to a Response and return it to repoze.bfg as if the WSGI app were a repoze.bfg view. @@ -41,7 +45,7 @@ def wsgiapp2(wrapped): WSGI environment *are* performed before the application is invoked. - E.g.:: + E.g. the following in a ``views.py`` module:: @wsgiapp2 def hello_world(environ, start_response): @@ -50,14 +54,18 @@ def wsgiapp2(wrapped): ('Content-Length', len(body)) ] ) return [body] - Allows the following view declaration to be made:: + Allows the following ZCML view declaration to be made:: + Or the following :term:`Configurator` ``add_view`` method call:: + + from views import hello_world + config.add_view(hello_world, name='hello_world.txt') + The wsgiapp2 decorator will convert the result of the WSGI application to a Response and return it to repoze.bfg as if the WSGI app were a repoze.bfg view. The ``SCRIPT_NAME`` and -- cgit v1.2.3