diff options
| author | Patricio Paez <pp@pp.com.mx> | 2012-12-01 17:59:44 -0600 |
|---|---|---|
| committer | Patricio Paez <pp@pp.com.mx> | 2012-12-01 17:59:44 -0600 |
| commit | b0b299feddcb25f29e6eb133865956fcd5bc0d6b (patch) | |
| tree | 5b8ae40295a6379fb6a642778bd60a501bc4e190 | |
| parent | 6d1eeedcd341a0468a2567f3034dde4d6dbcc6bd (diff) | |
| download | pyramid-b0b299feddcb25f29e6eb133865956fcd5bc0d6b.tar.gz pyramid-b0b299feddcb25f29e6eb133865956fcd5bc0d6b.tar.bz2 pyramid-b0b299feddcb25f29e6eb133865956fcd5bc0d6b.zip | |
Update line references
- In the Basic Layout and Authorization chapters
of the ZODB wiki tutorial
| -rw-r--r-- | docs/tutorials/wiki/authorization.rst | 6 | ||||
| -rw-r--r-- | docs/tutorials/wiki/basiclayout.rst | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/docs/tutorials/wiki/authorization.rst b/docs/tutorials/wiki/authorization.rst index 24249945a..e90dfe12d 100644 --- a/docs/tutorials/wiki/authorization.rst +++ b/docs/tutorials/wiki/authorization.rst @@ -127,7 +127,7 @@ add these import statements: 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 @@ expire an auth ticket cookie. 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 @@ when we're done: .. 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.) diff --git a/docs/tutorials/wiki/basiclayout.rst b/docs/tutorials/wiki/basiclayout.rst index 033dcb28c..12cf86a91 100644 --- a/docs/tutorials/wiki/basiclayout.rst +++ b/docs/tutorials/wiki/basiclayout.rst @@ -31,13 +31,13 @@ point happens to be the ``main`` function within the file named #. *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 @@ point happens to be the ``main`` function within the file named 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 @@ point happens to be the ``main`` function within the file named 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 @@ Here is the source for ``models.py``: :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 @@ Here is the source for ``models.py``: 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 @@ Let's try to understand the components in this module: #. *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 @@ Let's try to understand the components in this module: ``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`` |
