summaryrefslogtreecommitdiff
path: root/docs/narr/router.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-11-09 03:54:45 -0500
committerChris McDonough <chrism@plope.com>2010-11-09 03:54:45 -0500
commitfd5ae92bd218b72a7a923e406eee023afe024dc0 (patch)
tree17fd402d2d06a0360f813e682e73bb780874a2a4 /docs/narr/router.rst
parentf383367b91b02b28e2beec8132241003aacbedfd (diff)
downloadpyramid-fd5ae92bd218b72a7a923e406eee023afe024dc0.tar.gz
pyramid-fd5ae92bd218b72a7a923e406eee023afe024dc0.tar.bz2
pyramid-fd5ae92bd218b72a7a923e406eee023afe024dc0.zip
- All references to Pyramid-the-application were changed from :mod:`pyramid`
to :app:`Pyramid`. A custom role setting was added to ``docs/conf.py`` to allow for this. (internal)
Diffstat (limited to 'docs/narr/router.rst')
-rw-r--r--docs/narr/router.rst36
1 files changed, 18 insertions, 18 deletions
diff --git a/docs/narr/router.rst b/docs/narr/router.rst
index b585482ef..b106d02db 100644
--- a/docs/narr/router.rst
+++ b/docs/narr/router.rst
@@ -8,27 +8,27 @@
Request Processing
==================
-Once a :mod:`pyramid` application is up and running, it is ready to
+Once a :app:`Pyramid` application is up and running, it is ready to
accept requests and return responses.
What happens from the time a :term:`WSGI` request enters a
-:mod:`pyramid` application through to the point that
-:mod:`pyramid` hands off a response back to WSGI for upstream
+:app:`Pyramid` application through to the point that
+:app:`Pyramid` hands off a response back to WSGI for upstream
processing?
#. A user initiates a request from his browser to the hostname and
- port number of the WSGI server used by the :mod:`pyramid`
+ port number of the WSGI server used by the :app:`Pyramid`
application.
-#. The WSGI server used by the :mod:`pyramid` application passes
+#. The WSGI server used by the :app:`Pyramid` application passes
the WSGI environment to the ``__call__`` method of the
- :mod:`pyramid` :term:`router` object.
+ :app:`Pyramid` :term:`router` object.
#. A :term:`request` object is created based on the WSGI environment.
#. The :term:`application registry` and the :term:`request` object
created in the last step are pushed on to the :term:`thread local`
- stack that :mod:`pyramid` uses to allow the functions named
+ stack that :app:`Pyramid` uses to allow the functions named
:func:`pyramid.threadlocal.get_current_request` and
:func:`pyramid.threadlocal.get_current_registry` to work.
@@ -36,7 +36,7 @@ processing?
subscribers.
#. If any :term:`route` has been defined within application
- configuration, the :mod:`pyramid` :term:`router` calls a
+ configuration, the :app:`Pyramid` :term:`router` calls a
:term:`URL dispatch` "route mapper." The job of the mapper is to
examine the request to determine whether any user-defined
:term:`route` matches the current WSGI environment. The
@@ -59,7 +59,7 @@ processing?
argument passed to the Configurator constructor was ``None``, a
default root factory is used to generate a root object.
-#. The :mod:`pyramid` router calls a "traverser" function with the
+#. The :app:`Pyramid` router calls a "traverser" function with the
root object and the request. The traverser function attempts to
traverse the root object (using any existing ``__getitem__`` on the
root object and subobjects) to find a :term:`context`. If the root
@@ -77,32 +77,32 @@ processing?
#. A :class:`pyramid.events.ContextFound` :term:`event` is
sent to any subscribers.
-#. :mod:`pyramid` looks up a :term:`view` callable using the
+#. :app:`Pyramid` looks up a :term:`view` callable using the
context, the request, and the view name. If a view callable
doesn't exist for this combination of objects (based on the type of
the context, the type of the request, and the value of the view
name, and any :term:`predicate` attributes applied to the view
- configuration), :mod:`pyramid` raises a
+ configuration), :app:`Pyramid` raises a
:class:`pyramid.exceptions.NotFound` exception, which is meant
to be caught by a surrounding exception handler.
-#. If a view callable was found, :mod:`pyramid` attempts to call
+#. If a view callable was found, :app:`Pyramid` attempts to call
the view function.
#. If an :term:`authorization policy` is in use, and the view was
- protected by a :term:`permission`, :mod:`pyramid` passes the
+ protected by a :term:`permission`, :app:`Pyramid` passes the
context, the request, and the view_name to a function which
determines whether the view being asked for can be executed by the
requesting user, based on credential information in the request and
security information attached to the context. If it returns
- ``True``, :mod:`pyramid` calls the view callable to obtain a
+ ``True``, :app:`Pyramid` calls the view callable to obtain a
response. If it returns ``False``, it raises a
:class:`pyramid.exceptions.Forbidden` exception, which is meant
to be called by a surrounding exception handler.
#. If any exception was raised within a :term:`root factory`, by
:term:`traversal`, by a :term:`view callable` or by
- :mod:`pyramid` itself (such as when it raises
+ :app:`Pyramid` itself (such as when it raises
:class:`pyramid.exceptions.NotFound` or
:class:`pyramid.exceptions.Forbidden`), the router catches the
exception, and attaches it to the request as the ``exception``
@@ -114,7 +114,7 @@ processing?
#. The following steps occur only when a :term:`response` could be
successfully generated by a normal :term:`view callable` or an
- :term:`exception view` callable. :mod:`pyramid` will attempt to execute
+ :term:`exception view` callable. :app:`Pyramid` will attempt to execute
any :term:`response callback` functions attached via
:meth:`pyramid.request.Request.add_response_callback`. A
:class:`pyramid.events.NewResponse` :term:`event` is then sent to any
@@ -122,7 +122,7 @@ processing?
``headerlist`` attributes are then used to generate a WSGI response. The
response is sent back to the upstream WSGI server.
-#. :mod:`pyramid` will attempt to execute any :term:`finished
+#. :app:`Pyramid` will attempt to execute any :term:`finished
callback` functions attached via
:meth:`pyramid.request.Request.add_finished_callback`.
@@ -131,7 +131,7 @@ processing?
.. image:: router.png
This is a very high-level overview that leaves out various details.
-For more detail about subsystems invoked by the :mod:`pyramid` router
+For more detail about subsystems invoked by the :app:`Pyramid` router
such as traversal, URL dispatch, views, and event processing, see
:ref:`contextfinding_chapter`, :ref:`views_chapter`, and
:ref:`events_chapter`.