summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingmodels.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2013-03-21 10:09:00 -0700
committerMichael Merickel <michael@merickel.org>2013-03-21 10:09:00 -0700
commit1f168300303a8d9cf264cd17eaae06f6e1d7f734 (patch)
treee924aa40e5775eda9a0cddeebb368078a273f4e2 /docs/tutorials/wiki2/definingmodels.rst
parentea3e974d84c469cc07648d6be943e1e98ee50d33 (diff)
parent2a65f2086ce5b0c2f029fbc0ea165a65cd601ec3 (diff)
downloadpyramid-1f168300303a8d9cf264cd17eaae06f6e1d7f734.tar.gz
pyramid-1f168300303a8d9cf264cd17eaae06f6e1d7f734.tar.bz2
pyramid-1f168300303a8d9cf264cd17eaae06f6e1d7f734.zip
Merge pull request #931 from tshepang/sqla
add hyperlinks to SQLAlchemy docs
Diffstat (limited to 'docs/tutorials/wiki2/definingmodels.rst')
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index bd1cb00d7..d55da02cd 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -34,7 +34,7 @@ sample and we're not going to use it.
Then, we added a ``Page`` class. Because this is a SQLAlchemy application,
this class inherits from an instance of
-:class:`sqlalchemy.ext.declarative.declarative_base`.
+:func:`sqlalchemy.ext.declarative.declarative_base`.
.. literalinclude:: src/models/tutorial/models.py
:pyobject: Page
@@ -45,9 +45,10 @@ As you can see, our ``Page`` class has a class level attribute
``__tablename__`` which equals the string ``'pages'``. This means that
SQLAlchemy will store our wiki data in a SQL table named ``pages``. Our
``Page`` class will also have class-level attributes named ``id``, ``name`` and
-``data`` (all instances of :class:`sqlalchemy.Column`). These will map to
-columns in the ``pages`` table. The ``id`` attribute will be the primary key
-in the table. The ``name`` attribute will be a text attribute, each value of
+``data`` (all instances of :class:`sqlalchemy.schema.Column`).
+These will map to columns in the ``pages`` table.
+The ``id`` attribute will be the primary key in the table.
+The ``name`` attribute will be a text attribute, each value of
which needs to be unique within the column. The ``data`` attribute is a text
attribute that will hold the body of each page.