summaryrefslogtreecommitdiff
path: root/docs/narr/configuration.rst
diff options
context:
space:
mode:
authorAtsushi Odagiri <aodagx@gmail.com>2010-11-27 15:08:31 +0900
committerAtsushi Odagiri <aodagx@gmail.com>2010-11-27 15:08:31 +0900
commitcd2f78c893ce6ae98004189a1a0a649fac96d033 (patch)
tree5ab84f72e6bf0476d7d40841f3341aaf9a4e54a4 /docs/narr/configuration.rst
parentba32a8d0dcee7f3cef231e08ed60d52fbf60ed4f (diff)
parent4d76ed6f46304d43a6b95da7a4d5388527bf6c1e (diff)
downloadpyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.tar.gz
pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.tar.bz2
pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.zip
Merge remote branch 'remotes/upstream/master'
Diffstat (limited to 'docs/narr/configuration.rst')
-rw-r--r--docs/narr/configuration.rst18
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')