summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2015-05-23 12:05:56 -0700
committerSteve Piercy <web@stevepiercy.com>2015-05-23 12:05:56 -0700
commitc8e23eca583e1e3dd770951e820004a1477c4e11 (patch)
tree1b62fb715e4614035204c7782100dcae486f5be1 /docs/quick_tutorial
parent003b9aaef924ba3934a8e23854be5b7a6e6ae7e0 (diff)
downloadpyramid-c8e23eca583e1e3dd770951e820004a1477c4e11.tar.gz
pyramid-c8e23eca583e1e3dd770951e820004a1477c4e11.tar.bz2
pyramid-c8e23eca583e1e3dd770951e820004a1477c4e11.zip
fix template static asset URLs; grammar; line numbers
Diffstat (limited to 'docs/quick_tutorial')
-rw-r--r--docs/quick_tutorial/databases.rst16
-rw-r--r--docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt6
2 files changed, 13 insertions, 9 deletions
diff --git a/docs/quick_tutorial/databases.rst b/docs/quick_tutorial/databases.rst
index 7c019dbfc..580774163 100644
--- a/docs/quick_tutorial/databases.rst
+++ b/docs/quick_tutorial/databases.rst
@@ -53,8 +53,8 @@ Steps
.. note::
- We aren't yet doing ``python3.3 setup.py develop`` as we
- are changing it later.
+ We aren't yet doing ``$VENV/bin/python setup.py develop`` as we
+ will change it later.
#. Our configuration file at ``databases/development.ini`` wires
together some new pieces:
@@ -72,6 +72,7 @@ Steps
to initialize the database:
.. literalinclude:: databases/tutorial/initialize_db.py
+ :linenos:
#. Since ``setup.py`` changed, we now run it:
@@ -104,6 +105,7 @@ Steps
our ``databases/tutorial/views.py``:
.. literalinclude:: databases/tutorial/views.py
+ :linenos:
#. Our tests in ``databases/tutorial/tests.py`` changed to include
SQLAlchemy bootstrapping:
@@ -138,8 +140,8 @@ Let's start with the dependencies. We made the decision to use
``pyramid_tm`` and ``zope.sqlalchemy``. Why?
Pyramid has a strong orientation towards support for ``transactions``.
-Specifically, you can install a transaction manager into your app
-application, either as middleware or a Pyramid "tween". Then,
+Specifically, you can install a transaction manager into your
+application either as middleware or a Pyramid "tween". Then,
just before you return the response, all transaction-aware parts of
your application are executed.
@@ -149,7 +151,7 @@ aborts the transaction. This is a very liberating way to write code.
The ``pyramid_tm`` package provides a "tween" that is configured in the
``development.ini`` configuration file. That installs it. We then need
-a package that makes SQLAlchemy and thus the RDBMS transaction manager
+a package that makes SQLAlchemy, and thus the RDBMS transaction manager,
integrate with the Pyramid transaction manager. That's what
``zope.sqlalchemy`` does.
@@ -167,8 +169,8 @@ console script follows the pattern of being fed a configuration file
with all the bootstrapping. It then opens SQLAlchemy and creates the
root of the wiki, which also makes the SQLite file. Note the
``with transaction.manager`` part that puts the work in the scope of a
-transaction (as we aren't inside a web request where this is done
-automatically.)
+transaction, as we aren't inside a web request where this is done
+automatically.
The ``models.py`` does a little bit extra work to hook up SQLAlchemy
into the Pyramid transaction manager. It then declares the model for a
diff --git a/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt b/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt
index d1fea0d7f..01955ef72 100644
--- a/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt
+++ b/docs/quick_tutorial/databases/tutorial/wikipage_addedit.pt
@@ -4,10 +4,12 @@
<title>WikiPage: Add/Edit</title>
<tal:block tal:repeat="reqt view.reqts['css']">
<link rel="stylesheet" type="text/css"
- href="${request.static_url('deform:static/' + reqt)}"/>
+ href="${request.static_url(reqt)}">
</tal:block>
+ <script type="text/javascript"
+ src="${request.static_url('deform:static/scripts/jquery-2.0.3.min.js')}"></script>
<tal:block tal:repeat="reqt view.reqts['js']">
- <script src="${request.static_url('deform:static/' + reqt)}"
+ <script src="${request.static_url(reqt)}"
type="text/javascript"></script>
</tal:block>
</head>