diff options
| author | Michael Merickel <github@m.merickel.org> | 2018-08-21 01:44:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-21 01:44:55 -0500 |
| commit | 820a752645b460ea8009b07a75c752ab09c53dec (patch) | |
| tree | 14616d81a7abedfe523c057e71ed7b2aca680754 /docs/narr/advanced-features.rst | |
| parent | df8598a2658632f709a64e8076cce02ca49de8e6 (diff) | |
| parent | 254710cb716dccfe536b20d077e3cb79be19c6b3 (diff) | |
| download | pyramid-820a752645b460ea8009b07a75c752ab09c53dec.tar.gz pyramid-820a752645b460ea8009b07a75c752ab09c53dec.tar.bz2 pyramid-820a752645b460ea8009b07a75c752ab09c53dec.zip | |
Merge pull request #3330 from stevepiercy/docs-code-style
Docs code style
Diffstat (limited to 'docs/narr/advanced-features.rst')
| -rw-r--r-- | docs/narr/advanced-features.rst | 20 |
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: |
