summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/basiclayout.rst
diff options
context:
space:
mode:
authorPatricio Paez <pp@pp.com.mx>2012-12-01 19:43:02 -0600
committerPatricio Paez <pp@pp.com.mx>2012-12-01 19:43:02 -0600
commite90fa43a8051dfc8799596e17b72fd3d3def6516 (patch)
treeba0f33434c774d31841a497db04578c2f7a5442c /docs/tutorials/wiki2/basiclayout.rst
parentc47b8caa24857c1c35fd0ddf72a237c70b63f5cd (diff)
downloadpyramid-e90fa43a8051dfc8799596e17b72fd3d3def6516.tar.gz
pyramid-e90fa43a8051dfc8799596e17b72fd3d3def6516.tar.bz2
pyramid-e90fa43a8051dfc8799596e17b72fd3d3def6516.zip
Sync __init__.py in SQL wiki tutorial
- Update lines and emphasized-lines - No line numbers if only a single line
Diffstat (limited to 'docs/tutorials/wiki2/basiclayout.rst')
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst17
1 files changed, 8 insertions, 9 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index 4f73dc914..7b9c44bb1 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -51,15 +51,14 @@ The main function first creates a SQLAlchemy database engine using
(something like ``sqlite://``):
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 12
- :linenos:
+ :lines: 13
:language: py
``main`` then initializes our SQLAlchemy session object, passing it the
engine:
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 13
+ :lines: 14
:language: py
``main`` subsequently initializes our SQLAlchemy declarative Base object,
@@ -71,13 +70,13 @@ forgotten about this tutorial, you won't be left scratching your head when it
doesn't work.
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 14
+ :lines: 15
:language: py
The next step of ``main`` is to construct a :term:`Configurator` object:
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 15
+ :lines: 16
:language: py
``settings`` is passed to the Configurator as a keyword argument with the
@@ -90,7 +89,7 @@ deployment-related values such as ``pyramid.reload_templates``,
two arguments: ``static`` (the name), and ``static`` (the path):
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 16
+ :lines: 17
:language: py
This registers a static resource view which will match any URL that starts
@@ -108,7 +107,7 @@ via the :meth:`pyramid.config.Configurator.add_route` method that will be
used when the URL is ``/``:
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 17
+ :lines: 18
:language: py
Since this route has a ``pattern`` equalling ``/`` it is the route that will
@@ -121,7 +120,7 @@ view configuration will be registered, which will allow one of our
application URLs to be mapped to some code.
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 18
+ :lines: 19
:language: py
Finally, ``main`` is finished configuring things, so it uses the
@@ -129,7 +128,7 @@ Finally, ``main`` is finished configuring things, so it uses the
:term:`WSGI` application:
.. literalinclude:: src/basiclayout/tutorial/__init__.py
- :lines: 19
+ :lines: 20
:language: py
View Declarations via ``views.py``