summaryrefslogtreecommitdiff
path: root/docs/narr/firstapp.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/firstapp.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/firstapp.rst')
-rw-r--r--docs/narr/firstapp.rst49
1 files changed, 0 insertions, 49 deletions
diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst
index bc21bf29f..9d3cad13c 100644
--- a/docs/narr/firstapp.rst
+++ b/docs/narr/firstapp.rst
@@ -38,10 +38,8 @@ configured imperatively:
if __name__ == '__main__':
config = Configurator()
- config.begin()
config.add_view(hello_world)
config.add_view(goodbye_world, name='goodbye')
- config.end()
app = config.make_wsgi_app()
serve(app, host='0.0.0.0')
@@ -149,10 +147,8 @@ imports and function definitions is placed within the confines of an
if __name__ == '__main__':
config = Configurator()
- config.begin()
config.add_view(hello_world)
config.add_view(goodbye_world, name='goodbye')
- config.end()
app = config.make_wsgi_app()
serve(app, host='0.0.0.0')
@@ -190,29 +186,6 @@ this particular :app:`Pyramid` application. Methods called on the
Configurator will cause registrations to be made in a
:term:`application registry` associated with the application.
-Beginning Configuration
-~~~~~~~~~~~~~~~~~~~~~~~
-
-.. ignore-next-block
-.. code-block:: python
-
- config.begin()
-
-The :meth:`pyramid.configuration.Configurator.begin` method tells
-the system that application configuration has begun. In particular,
-this causes the :term:`application registry` associated with this
-configurator to become the "current" application registry, meaning
-that code which attempts to use the application registry :term:`thread
-local` will obtain the registry associated with the configurator.
-This is an explicit step because it's sometimes convenient to use a
-configurator without causing the registry associated with the
-configurator to become "current".
-
-.. note::
-
- See :ref:`threadlocals_chapter` for a discussion about what it
- means for an application registry to be "current".
-
.. _adding_configuration:
Adding Configuration
@@ -281,28 +254,6 @@ important. We can register ``goodbye_world`` first and
``hello_world`` second; :app:`Pyramid` will still give us the most
specific callable when a request is dispatched to it.
-Ending Configuration
-~~~~~~~~~~~~~~~~~~~~
-
-.. ignore-next-block
-.. code-block:: python
-
- config.end()
-
-The :meth:`pyramid.configuration.Configurator.end` method tells the
-system that application configuration has ended. It is the inverse of
-:meth:`pyramid.configuration.Configurator.begin`. In particular,
-this causes the :term:`application registry` associated with this
-configurator to no longer be the "current" application registry,
-meaning that code which attempts to use the application registry
-:term:`thread local` will no longer obtain the registry associated
-with the configurator.
-
-.. note::
-
- See :ref:`threadlocals_chapter` for a discussion about what it
- means for an application registry to be "current".
-
.. index::
single: make_wsgi_app
single: WSGI application