diff options
| author | Chris McDonough <chrism@plope.com> | 2010-11-19 22:28:50 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2010-11-19 22:28:50 -0500 |
| commit | 614f00c88733b5248922e2b610c96f7c8c3ff57c (patch) | |
| tree | c178e586f021abe0aca3975ec44f328fd7ccd806 /docs/narr/configuration.rst | |
| parent | ff3811e4a776f096869d860309d4cff04dcb99ba (diff) | |
| download | pyramid-614f00c88733b5248922e2b610c96f7c8c3ff57c.tar.gz pyramid-614f00c88733b5248922e2b610c96f7c8c3ff57c.tar.bz2 pyramid-614f00c88733b5248922e2b610c96f7c8c3ff57c.zip | |
- Remove calls to config.begin()/config.end() from startup config code in
tutorials and paster templates (no longer required).
Diffstat (limited to 'docs/narr/configuration.rst')
| -rw-r--r-- | docs/narr/configuration.rst | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/docs/narr/configuration.rst b/docs/narr/configuration.rst index 6a91cbf75..ae02a5a6c 100644 --- a/docs/narr/configuration.rst +++ b/docs/narr/configuration.rst @@ -47,20 +47,16 @@ imperatively: if __name__ == '__main__': config = Configurator() - config.begin() config.add_view(hello_world) - config.end() app = config.make_wsgi_app() serve(app, host='0.0.0.0') -We won't talk much about what this application does yet. Just note -that the "configuration' statements take place underneath the ``if -__name__ == '__main__':`` stanza in the form of method calls on a -:term:`Configurator` object (e.g. ``config.begin()``, -``config.add_view(...)``, and ``config.end()``. These statements take -place one after the other, and are executed in order, so the full -power of Python, including conditionals, can be employed in this mode -of configuration. +We won't talk much about what this application does yet. Just note that the +"configuration' statements take place underneath the ``if __name__ == +'__main__':`` stanza in the form of method calls on a :term:`Configurator` +object (e.g. ``config.add_view(...)``). These statements take place one +after the other, and are executed in order, so the full power of Python, +including conditionals, can be employed in this mode of configuration. .. index:: single: view_config @@ -123,9 +119,7 @@ and its subpackages. For example: if __name__ == '__main__': from pyramid.configuration import Configurator config = Configurator() - config.begin() config.scan() - config.end() app = config.make_wsgi_app() serve(app, host='0.0.0.0') |
