summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2015-10-30 01:06:45 -0700
committerSteve Piercy <web@stevepiercy.com>2015-10-30 01:06:45 -0700
commit604364e5348abd3312aa0c3eb9c2807b957db2c2 (patch)
tree2e280cb963ccc3f3fed34657c1498bcb9a6df9ef /docs
parenta2680f1909b435af92067de9830ac92c34ba7411 (diff)
parent33b89f5853aef30dfe4546083c62735ed3f96ef4 (diff)
downloadpyramid-604364e5348abd3312aa0c3eb9c2807b957db2c2.tar.gz
pyramid-604364e5348abd3312aa0c3eb9c2807b957db2c2.tar.bz2
pyramid-604364e5348abd3312aa0c3eb9c2807b957db2c2.zip
Merge pull request #2061 from stevepiercy/master
add linenos and emphasize-lines to code examples
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/subrequest.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/narr/subrequest.rst b/docs/narr/subrequest.rst
index 13b00efb6..02ae14aa5 100644
--- a/docs/narr/subrequest.rst
+++ b/docs/narr/subrequest.rst
@@ -17,6 +17,7 @@ application.
Here's an example application which uses a subrequest:
.. code-block:: python
+ :linenos:
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
@@ -56,9 +57,12 @@ Note that it doesn't matter if the view callable invoked via a subrequest
actually returns a *literal* Response object. Any view callable that uses a
renderer or which returns an object that can be interpreted by a response
adapter when found and invoked via
-:meth:`pyramid.request.Request.invoke_subrequest` will return a Response object:
+:meth:`pyramid.request.Request.invoke_subrequest` will return a Response
+object:
.. code-block:: python
+ :linenos:
+ :emphasize-lines: 11
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
@@ -102,6 +106,8 @@ exception, the exception will be raised to the caller of
:term:`exception view` configured:
.. code-block:: python
+ :linenos:
+ :emphasize-lines: 11-16
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
@@ -169,6 +175,8 @@ We can cause the subrequest to be run through the tween stack by passing
:meth:`~pyramid.request.Request.invoke_subrequest`, like this:
.. code-block:: python
+ :linenos:
+ :emphasize-lines: 7
from wsgiref.simple_server import make_server
from pyramid.config import Configurator