summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki/basiclayout.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2017-08-03 22:36:25 -0700
committerSteve Piercy <web@stevepiercy.com>2017-08-03 22:36:25 -0700
commit759febef4df499d7dbd68e0a74f17b69e4e68ad2 (patch)
treecc5317be11c49ae498da947304fb0d8eef3cd89b /docs/tutorials/wiki/basiclayout.rst
parent1b8a348919b00a1d0d6e4b0110646b884b72dec8 (diff)
downloadpyramid-759febef4df499d7dbd68e0a74f17b69e4e68ad2.tar.gz
pyramid-759febef4df499d7dbd68e0a74f17b69e4e68ad2.tar.bz2
pyramid-759febef4df499d7dbd68e0a74f17b69e4e68ad2.zip
update zodb wiki files to synch with its cookiecutter using context manager
Diffstat (limited to 'docs/tutorials/wiki/basiclayout.rst')
-rw-r--r--docs/tutorials/wiki/basiclayout.rst22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/tutorials/wiki/basiclayout.rst b/docs/tutorials/wiki/basiclayout.rst
index f713d1057..b6363088b 100644
--- a/docs/tutorials/wiki/basiclayout.rst
+++ b/docs/tutorials/wiki/basiclayout.rst
@@ -37,20 +37,20 @@ Open ``tutorial/__init__.py``. It should already contain the following:
#. *Line 11*. ``__init__.py`` defines a function named ``main``.
-#. *Line 14*. We construct a :term:`Configurator` with a root
- factory and the settings keywords parsed by :term:`PasteDeploy`. The root
- factory is named ``root_factory``.
+#. *Line 14*. Use an explicit transaction manager for apps so that they do not implicitly create new transactions when touching the manager outside of the ``pyramid_tm`` lifecycle.
-#. *Lines 15 and 16*. Get the settings and use an explicit transaction transaction manager for apps so that they do not implicitly create new transactions when touching the manager outside of the ``pyramid_tm`` lifecycle.
+#. *Line 15*. Construct a :term:`Configurator` as a :term:`context manager` with the settings keyword parsed by :term:`PasteDeploy`.
-#. *Line 17*. Include support for the :term:`Chameleon` template rendering
+#. *Line 16*. Include support for the :term:`Chameleon` template rendering
bindings, allowing us to use the ``.pt`` templates.
-#. *Line 18*. Include support for ``pyramid_tm``, allowing Pyramid requests to join the active transaction as provided by the `transaction <https://pypi.python.org/pypi/transaction>`_ package.
+#. *Line 17*. Include support for ``pyramid_tm``, allowing Pyramid requests to join the active transaction as provided by the `transaction <https://pypi.python.org/pypi/transaction>`_ package.
-#. *Line 19*. Include support for ``pyramid_retry`` to retry a request when transient exceptions occur.
+#. *Line 18*. Include support for ``pyramid_retry`` to retry a request when transient exceptions occur.
-#. *Line 20*. Include support for ``pyramid_zodbconn``, providing integration between :term:`ZODB` and a Pyramid application.
+#. *Line 19*. Include support for ``pyramid_zodbconn``, providing integration between :term:`ZODB` and a Pyramid application.
+
+#. *Line 20*. Set a root factory using our function named ``root_factory``.
#. *Line 21*. Register a "static view", which answers requests whose URL
paths start with ``/static``, using the
@@ -65,7 +65,7 @@ Open ``tutorial/__init__.py``. It should already contain the following:
package. Alternatively the cookiecutter could have used an *absolute* asset
specification as the path (``tutorial:static``).
-#. *Line 19*. Perform a :term:`scan`. A scan will find :term:`configuration
+#. *Line 22*. Perform a :term:`scan`. A scan will find :term:`configuration
decoration`, such as view configuration decorators (e.g., ``@view_config``)
in the source code of the ``tutorial`` package and will take actions based
on these decorators. We don't pass any arguments to
@@ -74,7 +74,7 @@ Open ``tutorial/__init__.py``. It should already contain the following:
The cookiecutter could have equivalently said ``config.scan('tutorial')``, but
it chose to omit the package name argument.
-#. *Line 20*. Use the
+#. *Line 23*. Use the
:meth:`pyramid.config.Configurator.make_wsgi_app` method
to return a :term:`WSGI` application.
@@ -104,7 +104,7 @@ Here is the source for ``models.py``:
By default, set these to ``None`` to indicate that this is the
:term:`root` object.
-#. *Lines 8-14*. ``appmaker`` is used to return the *application
+#. *Lines 8-12*. ``appmaker`` is used to return the *application
root* object. It is called on *every request* to the
:app:`Pyramid` application. It also performs bootstrapping by
*creating* an application root (inside the ZODB root object) if one