diff options
| author | Steve Piercy <web@stevepiercy.com> | 2020-01-15 05:25:13 -0800 |
|---|---|---|
| committer | Steve Piercy <web@stevepiercy.com> | 2020-01-15 05:25:13 -0800 |
| commit | f2c900097e709c71c893cce6492c6d8d1cdb25f2 (patch) | |
| tree | e180e9fb18b1b91d04973a501fda9b08a1bc1169 /docs | |
| parent | 3152aa5e4b1cf053f94725d3dc8069bfe20a14be (diff) | |
| download | pyramid-f2c900097e709c71c893cce6492c6d8d1cdb25f2.tar.gz pyramid-f2c900097e709c71c893cce6492c6d8d1cdb25f2.tar.bz2 pyramid-f2c900097e709c71c893cce6492c6d8d1cdb25f2.zip | |
Update emphasize-lines for definingmodels.rst to clarify changes and fix alignment.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tutorials/wiki/definingmodels.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/tutorials/wiki/definingmodels.rst b/docs/tutorials/wiki/definingmodels.rst index d4402915a..3b1e38c7d 100644 --- a/docs/tutorials/wiki/definingmodels.rst +++ b/docs/tutorials/wiki/definingmodels.rst @@ -43,8 +43,11 @@ Open ``tutorial/models/__init__.py`` file and edit it to look like the following .. literalinclude:: src/models/tutorial/models/__init__.py :linenos: + :emphasize-lines: 1,5-11,15-19 :language: python +The emphasized lines indicate changes, described as follows. + Remove the ``MyModel`` class from the generated ``models/__init__.py`` file. The ``MyModel`` class is only a sample and we're not going to use it. @@ -62,6 +65,7 @@ Then we add a ``Wiki`` class. .. literalinclude:: src/models/tutorial/models/__init__.py :pyobject: Wiki :lineno-match: + :emphasize-lines: 1-3 :language: py We want it to inherit from the :class:`persistent.mapping.PersistentMapping` class because it provides mapping behavior. @@ -76,6 +80,7 @@ Now we add a ``Page`` class. .. literalinclude:: src/models/tutorial/models/__init__.py :pyobject: Page :lineno-match: + :emphasize-lines: 1-3 :language: py This class should inherit from the :class:`persistent.Persistent` class. @@ -93,7 +98,7 @@ As a last step, edit the ``appmaker`` function. .. literalinclude:: src/models/tutorial/models/__init__.py :pyobject: appmaker :lineno-match: - :emphasize-lines: 4-8 + :emphasize-lines: 3-7 :language: py The :term:`root` :term:`resource` of our application is a Wiki instance. |
