summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingmodels.rst
diff options
context:
space:
mode:
authorKirk Strauser <kirk@strauser.com>2011-04-20 13:34:51 -0500
committerKirk Strauser <kirk@strauser.com>2011-04-20 13:34:51 -0500
commit89346583ec29dcc5d973cc807ae9899cf81b06ef (patch)
tree869e08a66f1c2414f50ad913a7cfd83bad98e646 /docs/tutorials/wiki2/definingmodels.rst
parentbea9f5b1b99fc27ee2a79512d098d688aea9d113 (diff)
downloadpyramid-89346583ec29dcc5d973cc807ae9899cf81b06ef.tar.gz
pyramid-89346583ec29dcc5d973cc807ae9899cf81b06ef.tar.bz2
pyramid-89346583ec29dcc5d973cc807ae9899cf81b06ef.zip
Fixed typos and added clarifications in a tutorial
I was working through the wiki2 tutorial this morning and found some slightly confusing bits. As I went along, I added the suggested changes to my local files to make them match the tutorial's version, but found several times that key parts were missing. I'm not new to Python so this didn't slow me down, but thought some clarifications might help new users.
Diffstat (limited to 'docs/tutorials/wiki2/definingmodels.rst')
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index 1661753c1..e5d283125 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -26,6 +26,14 @@ The first thing we want to do is remove the stock ``MyModel`` class from the
generated ``models.py`` file. The ``MyModel`` class is only a sample and
we're not going to use it.
+Next, we'll remove the :class:`sqlalchemy.Unicode` import and replace it
+with :class:`sqlalchemy.Text`.
+
+.. literalinclude:: src/models/tutorial/models.py
+ :lines: 5
+ :linenos:
+ :language: py
+
Then, we'll add a ``Page`` class. Because this is a SQLAlchemy
application, this class should inherit from an instance of
:class:`sqlalchemy.ext.declarative.declarative_base`. Declarative