diff options
| author | Michael Merickel <michael@merickel.org> | 2016-12-23 15:08:50 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-23 15:08:50 -0600 |
| commit | a7d55e25efdd14c7cbc36f23b446babce14b238e (patch) | |
| tree | ed4b7ddd23b5a506780463ba2d51377b83afc646 /docs/tutorials/wiki/definingmodels.rst | |
| parent | 933d3494b31286f45e5c460e0881b2a3cb616c42 (diff) | |
| parent | 1117bcd9a458e2f8664cabeef84209cf7b168e30 (diff) | |
| download | pyramid-a7d55e25efdd14c7cbc36f23b446babce14b238e.tar.gz pyramid-a7d55e25efdd14c7cbc36f23b446babce14b238e.tar.bz2 pyramid-a7d55e25efdd14c7cbc36f23b446babce14b238e.zip | |
Merge pull request #2881 from stevepiercy/docs-cookiecutter-changes-only
docs cookiecutter changes only
Diffstat (limited to 'docs/tutorials/wiki/definingmodels.rst')
| -rw-r--r-- | docs/tutorials/wiki/definingmodels.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/tutorials/wiki/definingmodels.rst b/docs/tutorials/wiki/definingmodels.rst index 73dce14d5..419fede62 100644 --- a/docs/tutorials/wiki/definingmodels.rst +++ b/docs/tutorials/wiki/definingmodels.rst @@ -4,7 +4,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 cookiecutter-generated application will be to define two :term:`resource` constructors, one representing a wiki page, and another representing the wiki as a mapping of wiki page names to page objects. We'll do this inside our ``models.py`` file. @@ -50,7 +50,9 @@ The first thing we want to do is remove the ``MyModel`` class from the generated ``models.py`` file. The ``MyModel`` class is only a sample and we're not going to use it. -Then, we'll add a ``Wiki`` class. We want it to inherit from the +Then we'll add an import at the top for the :class:`persistent.Persistent` class. We'll use this for a new ``Page`` class in a moment. + +Then we'll add a ``Wiki`` class. We want it to inherit from the :class:`persistent.mapping.PersistentMapping` class because it provides mapping behavior, and it makes sure that our Wiki page is stored as a "first-class" persistent object in our ZODB database. |
