summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/definingmodels.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/tutorials/wiki2/definingmodels.rst')
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst13
1 files changed, 10 insertions, 3 deletions
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index 66106ffee..0810ad1c5 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -21,11 +21,15 @@ Making Edits to ``models.py``
(or they may live in a Python subpackage of your application package named
``models``) , but this is only by convention.
-Here's what our ``models.py`` file should look like after this step:
+Open ``tutorial/tutorial/models.py`` file and edit it to look like the
+following:
.. literalinclude:: src/models/tutorial/models.py
:linenos:
:language: py
+ :emphasize-lines: 19-21,24,26,28
+
+(The highlighted lines are the ones that need to be changed.)
The first thing we've done is to do is remove the stock ``MyModel`` class
from the generated ``models.py`` file. The ``MyModel`` class is only a
@@ -63,12 +67,15 @@ script. In particular, we'll replace our import of ``MyModel`` with one of
``Page`` and we'll change the very end of the script to create a ``Page``
rather than a ``MyModel`` and add it to our ``DBSession``.
-The result of all of our edits to ``populate.py`` will end up looking
-something like this:
+Open ``tutorial/tutorial/scripts/populate.py`` and edit it to look like the
+following:
.. literalinclude:: src/models/tutorial/scripts/populate.py
:linenos:
:language: python
+ :emphasize-lines: 14,34
+
+(Only the highlighted lines need to be changed.)
Repopulating the Database
-------------------------