summaryrefslogtreecommitdiff
path: root/repoze/bfg/wsgi.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-12-09 00:34:50 +0000
committerChris McDonough <chrism@agendaless.com>2009-12-09 00:34:50 +0000
commit8b1f6e5ed3f9fc32b5eb03257d24eaf754a797a9 (patch)
treeb0525c11e88c5adf6c233c09d7e9318429d54265 /repoze/bfg/wsgi.py
parentf46de3bb0a9d2c9823aa3221fd28d80aed65b719 (diff)
downloadpyramid-8b1f6e5ed3f9fc32b5eb03257d24eaf754a797a9.tar.gz
pyramid-8b1f6e5ed3f9fc32b5eb03257d24eaf754a797a9.tar.bz2
pyramid-8b1f6e5ed3f9fc32b5eb03257d24eaf754a797a9.zip
- General documentation freshening which takes imperative
configuration into account in more places and uses glossary references more liberally.
Diffstat (limited to 'repoze/bfg/wsgi.py')
-rw-r--r--repoze/bfg/wsgi.py20
1 files changed, 14 insertions, 6 deletions
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::
<view
view=".views.hello_world"
name="hello_world.txt"
- context="*"
/>
+ 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::
<view
view=".views.hello_world"
name="hello_world.txt"
- context="*"
/>
+ 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