From 218ad474c5e8db6925ed6a5f4067ae3db69f68c8 Mon Sep 17 00:00:00 2001 From: Patricio Paez Date: Mon, 12 Mar 2012 15:49:58 -0700 Subject: Added links to Starting the Application - Sections 'Viewing the Application in a Browser' in the 'Defining the Domain Model' and 'Defining the Views' chapters now offer a quick link in both wiki tutorials, as suggested by Paulo. --- docs/tutorials/wiki2/definingmodels.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/definingmodels.rst') diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst index 2b8932a98..66106ffee 100644 --- a/docs/tutorials/wiki2/definingmodels.rst +++ b/docs/tutorials/wiki2/definingmodels.rst @@ -122,7 +122,8 @@ Viewing the Application in a Browser We can't. At this point, our system is in a "non-runnable" state; we'll need to change view-related files in the next chapter to be able to start the -application successfully. If you try to start the application, you'll wind +application successfully. If you try to start the application (See +:ref:`wiki2-start-the-application`), you'll wind up with a Python traceback on your console that ends with this exception: .. code-block:: text -- cgit v1.2.3 From 197808638a50dc085efc7511e24c043274e35663 Mon Sep 17 00:00:00 2001 From: Audrey Roy Date: Mon, 12 Mar 2012 17:02:46 -0700 Subject: Clarified which files to open/edit. Highlighted the lines to be edited in models.py. --- docs/tutorials/wiki2/definingmodels.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/definingmodels.rst') diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst index 66106ffee..ca0493f32 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 -- cgit v1.2.3 From c4b64f07487e23427187c08aaf3aec8b89bd267f Mon Sep 17 00:00:00 2001 From: Audrey Roy Date: Mon, 12 Mar 2012 18:07:36 -0700 Subject: The import also has changed and needs to be edited by the user, so I highlighted it. --- docs/tutorials/wiki2/definingmodels.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'docs/tutorials/wiki2/definingmodels.rst') diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst index ca0493f32..0810ad1c5 100644 --- a/docs/tutorials/wiki2/definingmodels.rst +++ b/docs/tutorials/wiki2/definingmodels.rst @@ -67,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 ------------------------- -- cgit v1.2.3