summaryrefslogtreecommitdiff
path: root/docs/narr/advanced-features.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-08-18 02:53:29 -0700
committerSteve Piercy <web@stevepiercy.com>2018-08-18 02:53:29 -0700
commitff6b0067cd30c391b16fa6a0cf06d6c4ad3cf3d6 (patch)
treea5589e50a476f89e78ae9e9bc84612d0f4314962 /docs/narr/advanced-features.rst
parentfcc53a4d3424b064761a1fbd49be66e2f39cd906 (diff)
downloadpyramid-ff6b0067cd30c391b16fa6a0cf06d6c4ad3cf3d6.tar.gz
pyramid-ff6b0067cd30c391b16fa6a0cf06d6c4ad3cf3d6.tar.bz2
pyramid-ff6b0067cd30c391b16fa6a0cf06d6c4ad3cf3d6.zip
Clean up code-blocks in advanced-features
Diffstat (limited to 'docs/narr/advanced-features.rst')
-rw-r--r--docs/narr/advanced-features.rst20
1 files changed, 10 insertions, 10 deletions
diff --git a/docs/narr/advanced-features.rst b/docs/narr/advanced-features.rst
index 82e20963d..191996c27 100644
--- a/docs/narr/advanced-features.rst
+++ b/docs/narr/advanced-features.rst
@@ -92,10 +92,10 @@ For example, if you want to reuse an existing application that already has a bun
from pyramid.config import Configurator
if __name__ == '__main__':
- config = Configurator()
- config.include('pyramid_jinja2')
- config.include('pyramid_exclog')
- config.include('some.other.package', route_prefix='/somethingelse')
+ config = Configurator()
+ config.include('pyramid_jinja2')
+ config.include('pyramid_exclog')
+ config.include('some.other.package', route_prefix='/somethingelse')
.. seealso::
@@ -262,12 +262,12 @@ You can extend :app:`Pyramid`\ 's :term:`configurator` with your own directives.
config = Configurator()
config.add_route('xhr_route', '/xhr/{id}')
- config.add_view('my.package.GET_view', route_name='xhr_route',
- xhr=True, permission='view', request_method='GET')
- config.add_view('my.package.POST_view', route_name='xhr_route',
- xhr=True, permission='view', request_method='POST')
- config.add_view('my.package.HEAD_view', route_name='xhr_route',
- xhr=True, permission='view', request_method='HEAD')
+ config.add_view('my.package.GET_view', route_name='xhr_route', xhr=True,
+ permission='view', request_method='GET')
+ config.add_view('my.package.POST_view', route_name='xhr_route', xhr=True,
+ permission='view', request_method='POST')
+ config.add_view('my.package.HEAD_view', route_name='xhr_route', xhr=True,
+ permission='view', request_method='HEAD')
Pretty tedious right? You can add a directive to the :app:`Pyramid` :term:`configurator` to automate some of the tedium away: