Patricio Paez
2012-12-02 b0b299feddcb25f29e6eb133865956fcd5bc0d6b
Update line references

- In the Basic Layout and Authorization chapters
of the ZODB wiki tutorial
2 files modified
24 ■■■■ changed files
docs/tutorials/wiki/authorization.rst 6 ●●●● patch | view | raw | blame | history
docs/tutorials/wiki/basiclayout.rst 18 ●●●● patch | view | raw | blame | history
docs/tutorials/wiki/authorization.rst
@@ -127,7 +127,7 @@
Now add those policies to the configuration:
.. literalinclude:: src/authorization/tutorial/__init__.py
   :lines: 17-22
   :lines: 18-23
   :linenos:
   :emphasize-lines: 1-3,5-6
   :language: python
@@ -213,7 +213,7 @@
Now add the ``login`` and ``logout`` views:
.. literalinclude:: src/authorization/tutorial/views.py
   :lines: 87-120
   :lines: 82-120
   :linenos:
   :language: python
@@ -306,7 +306,7 @@
.. literalinclude:: src/authorization/tutorial/__init__.py
   :linenos:
   :emphasize-lines: 4-5,8,17-19,21-22
   :emphasize-lines: 4-5,8,18-20,22-23
   :language: python
(Only the highlighted lines need to be added.)
docs/tutorials/wiki/basiclayout.rst
@@ -31,13 +31,13 @@
#. *Lines 1-3*.  Perform some dependency imports.
#. *Lines 5-7*  Define a root factory for our Pyramid application.
#. *Lines 6-8*  Define a root factory for our Pyramid application.
#. *Line 12*.  We construct a :term:`Configurator` with a :term:`root
#. *Line 14*.  We construct a :term:`Configurator` with a :term:`root
   factory` and the settings keywords parsed by :term:`PasteDeploy`.  The root
   factory is named ``root_factory``.
#. *Line 13*.  Register a 'static view' which answers requests which start
#. *Line 15*.  Register a 'static view' which answers requests which start
   with with URL path ``/static`` using the
   :meth:`pyramid.config.Configurator.add_static_view method`.  This
   statement registers a view that will serve up static assets, such as CSS
@@ -50,7 +50,7 @@
   package.  The scaffold could have alternately used an *absolute* asset
   specification as the path (``tutorial:static``) but it does not.
#. *Line 14*.  Perform a :term:`scan`.  A scan will find :term:`configuration
#. *Line 16*.  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
@@ -59,7 +59,7 @@
   The scaffold could have equivalently said ``config.scan('tutorial')`` but
   it chose to omit the package name argument.
#. *Line 15*.  Use the
#. *Line 17*.  Use the
   :meth:`pyramid.config.Configurator.make_wsgi_app` method
   to return a :term:`WSGI` application.
@@ -81,7 +81,7 @@
      :linenos:
      :language: py
#. *Lines 3-4*.  The ``MyModel`` :term:`resource` class is implemented here.
#. *Lines 4-5*.  The ``MyModel`` :term:`resource` class is implemented here.
   Instances of this class will be capable of being persisted in :term:`ZODB`
   because the class inherits from the
   :class:`persistent.mapping.PersistentMapping` class.  The ``__parent__``
@@ -89,7 +89,7 @@
   By default, have these as ``None`` indicating that this is the
   :term:`root` object.
#. *Lines 6-12*.  ``appmaker`` is used to return the *application
#. *Lines 8-14*.  ``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
@@ -118,7 +118,7 @@
#. *Lines 1-2*. Perform some dependency imports.
#. *Line 4*.  Use the :func:`pyramid.view.view_config` :term:`configuration
#. *Line 5*.  Use the :func:`pyramid.view.view_config` :term:`configuration
   decoration` to perform a :term:`view configuration` registration.  This
   view configuration registration will be activated when the application is
   started.  It will be activated by virtue of it being found as the result
@@ -148,7 +148,7 @@
   ``my_view`` function which it decorates represents the "default" view
   callable used when the context is of the type ``MyModel``.
#. *Lines 5-6*.  We define a :term:`view callable` named ``my_view``, which
#. *Lines 6-7*.  We define a :term:`view callable` named ``my_view``, which
   we decorated in the step above.  This view callable is a *function* we
   write generated by the ``zodb`` scaffold that is given a
   ``request`` and which returns a dictionary.  The ``mytemplate.pt``