summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2018-10-16 20:57:42 -0500
committerMichael Merickel <michael@merickel.org>2018-10-16 20:57:42 -0500
commite14661417e7ceb50d5cf83bbd6abd6b133e473ba (patch)
treecdc933820d2395e841fb54924c5c6d15ae3dd478 /src
parente8a70ab171463551bf3f84e03f3c3f01d76bdf01 (diff)
downloadpyramid-e14661417e7ceb50d5cf83bbd6abd6b133e473ba.tar.gz
pyramid-e14661417e7ceb50d5cf83bbd6abd6b133e473ba.tar.bz2
pyramid-e14661417e7ceb50d5cf83bbd6abd6b133e473ba.zip
fix the docs for route_prefix_context to avoid showing up as a doctest
Diffstat (limited to 'src')
-rw-r--r--src/pyramid/config/routes.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pyramid/config/routes.py b/src/pyramid/config/routes.py
index 4e1cb0762..f38050da3 100644
--- a/src/pyramid/config/routes.py
+++ b/src/pyramid/config/routes.py
@@ -535,19 +535,18 @@ class RoutesConfiguratorMixin(object):
Example Usage:
- >>> config = Configurator()
- >>> with config.route_prefix_context('foo'):
- ... config.add_route('bar', '/bar')
+ .. code-block:: python
- Arguments
+ config = Configurator()
+ with config.route_prefix_context('foo'):
+ config.add_route('bar', '/bar')
- route_prefix
-
- A string suitable to be used as a route prefix, or ``None``.
+ ``route_prefix`` is a string suitable to be used as a route prefix,
+ or ``None``.
.. versionadded:: 1.10
- """
+ """
original_route_prefix = self.route_prefix
if route_prefix is None: