From ff6b0067cd30c391b16fa6a0cf06d6c4ad3cf3d6 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 18 Aug 2018 02:53:29 -0700 Subject: Clean up code-blocks in advanced-features --- docs/narr/advanced-features.rst | 20 ++++++++++---------- 1 file 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: -- cgit v1.2.3