summaryrefslogtreecommitdiff
path: root/docs/narr/configuration.rst
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-11-19 23:25:44 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-11-19 23:25:44 -0700
commitb6f6e5506fa51a79eb5b0bb3c95b01878526fbff (patch)
tree277dbc6019c7f5b0f2cb1b35074186e247f526a8 /docs/narr/configuration.rst
parent673d55a3188d88c5fcf66062a894818a66722334 (diff)
parentdd53294c3342f58e0fb62b20ad61e59c1f88ac8b (diff)
downloadpyramid-b6f6e5506fa51a79eb5b0bb3c95b01878526fbff.tar.gz
pyramid-b6f6e5506fa51a79eb5b0bb3c95b01878526fbff.tar.bz2
pyramid-b6f6e5506fa51a79eb5b0bb3c95b01878526fbff.zip
merge changes from 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 6c5bc614b..d55a190e2 100644
--- a/docs/narr/configuration.rst
+++ b/docs/narr/configuration.rst
@@ -46,20 +46,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
@@ -122,9 +118,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')