summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingmodels.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-12-10 12:33:54 -0800
committerChris McDonough <chrism@plope.com>2012-12-10 12:33:54 -0800
commitf3a84be3b0e37b74acc26cfb413800610af85b86 (patch)
tree113a6b7aea8015518c89cfa42e9bb0df34bed37c /docs/tutorials/wiki2/definingmodels.rst
parent551ac9d57471868f901b928df085b205a18db658 (diff)
parent9223b3cbff80328431e3711eba2a317bb206286e (diff)
downloadpyramid-f3a84be3b0e37b74acc26cfb413800610af85b86.tar.gz
pyramid-f3a84be3b0e37b74acc26cfb413800610af85b86.tar.bz2
pyramid-f3a84be3b0e37b74acc26cfb413800610af85b86.zip
Merge pull request #736 from msabramo/docs-tutorials-wiki2-tweaks
A bunch of minor tweaks to the wiki2 tutorial in docs/tutorials/wiki2
Diffstat (limited to 'docs/tutorials/wiki2/definingmodels.rst')
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index e46e9fde0..2148582f1 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -2,7 +2,7 @@
Defining the Domain Model
=========================
-The first change we'll make to our stock pcreate-generated application will
+The first change we'll make to our stock ``pcreate``-generated application will
be to define a :term:`domain model` constructor representing a wiki page.
We'll do this inside our ``models.py`` file.
@@ -15,7 +15,7 @@ Making Edits to ``models.py``
.. note::
- There is nothing automagically special about the filename ``models.py``. A
+ There is nothing special about the filename ``models.py``. A
project may have many models throughout its codebase in arbitrarily-named
files. Files implementing models often have ``model`` in their filenames
(or they may live in a Python subpackage of your application package named
@@ -46,8 +46,8 @@ this class inherits from an instance of
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
+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