diff options
| author | Steve Piercy <web@stevepiercy.com> | 2016-12-23 03:08:17 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2016-12-23 03:08:17 -0800 |
| commit | beb4f1a1c771b295a41c65ba17b943a943f02911 (patch) | |
| tree | 276819f9a65a6349b58196ba5805c62a8c6fe63e /docs/tutorials/wiki/definingmodels.rst | |
| parent | 933d3494b31286f45e5c460e0881b2a3cb616c42 (diff) | |
| download | pyramid-beb4f1a1c771b295a41c65ba17b943a943f02911.tar.gz pyramid-beb4f1a1c771b295a41c65ba17b943a943f02911.tar.bz2 pyramid-beb4f1a1c771b295a41c65ba17b943a943f02911.zip | |
Use cookiecutter instead of scaffold and pcreate
- minor grammar and reST fixes
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. |
