summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2016-02-07 13:57:51 -0600
committerMichael Merickel <michael@merickel.org>2016-02-07 13:57:51 -0600
commitd1cb34643e086ac74965455b486ce0058764324f (patch)
tree56a344664e9a49c54b6dd7ad03a0f709500e0dc6 /docs
parent21d69fd97b66401264746bb7dad1e8d4bd2491b9 (diff)
downloadpyramid-d1cb34643e086ac74965455b486ce0058764324f.tar.gz
pyramid-d1cb34643e086ac74965455b486ce0058764324f.tar.bz2
pyramid-d1cb34643e086ac74965455b486ce0058764324f.zip
assume the user is in the tutorial folder
this is already assumed inside of installation where commands are run relative to setup.py
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorials/wiki2/basiclayout.rst8
-rw-r--r--docs/tutorials/wiki2/definingmodels.rst13
-rw-r--r--docs/tutorials/wiki2/definingviews.rst6
3 files changed, 14 insertions, 13 deletions
diff --git a/docs/tutorials/wiki2/basiclayout.rst b/docs/tutorials/wiki2/basiclayout.rst
index 6d1ff73a0..eb315d2cb 100644
--- a/docs/tutorials/wiki2/basiclayout.rst
+++ b/docs/tutorials/wiki2/basiclayout.rst
@@ -16,7 +16,7 @@ package. We use ``__init__.py`` both as a marker, indicating the directory in
which it's contained is a package, and to contain application configuration
code.
-Open ``tutorial/tutorial/__init__.py``. It should already contain the
+Open ``tutorial/__init__.py``. It should already contain the
following:
.. literalinclude:: src/basiclayout/tutorial/__init__.py
@@ -134,7 +134,7 @@ The main function of a web framework is mapping each URL pattern to code (a
corresponding :term:`route`. Our application uses the
:meth:`pyramid.view.view_config` decorator to perform this mapping.
-Open ``tutorial/tutorial/views/default.py`` in the ``views`` package. It
+Open ``tutorial/views/default.py`` in the ``views`` package. It
should already contain the following:
.. literalinclude:: src/basiclayout/tutorial/views/default.py
@@ -179,7 +179,7 @@ In a SQLAlchemy-based application, a *model* object is an object composed by
querying the SQL database. The ``models`` package is where the ``alchemy``
scaffold put the classes that implement our models.
-First, open ``tutorial/tutorial/models/meta.py``, which should already contain
+First, open ``tutorial/models/meta.py``, which should already contain
the following:
.. literalinclude:: src/basiclayout/tutorial/models/meta.py
@@ -234,7 +234,7 @@ The ``MyModel`` class has a ``__tablename__`` attribute. This informs
SQLAlchemy which table to use to store the data representing instances of this
class.
-Finally, open ``tutorial/tutorial/models/__init__.py``, which should already
+Finally, open ``tutorial/models/__init__.py``, which should already
contain the following:
.. literalinclude:: src/basiclayout/tutorial/models/__init__.py
diff --git a/docs/tutorials/wiki2/definingmodels.rst b/docs/tutorials/wiki2/definingmodels.rst
index b38177d04..9b517994f 100644
--- a/docs/tutorials/wiki2/definingmodels.rst
+++ b/docs/tutorials/wiki2/definingmodels.rst
@@ -14,11 +14,12 @@ Edit ``mymodel.py``
There is nothing special about the filename ``mymodel.py``. A
project may have many models throughout its codebase in arbitrarily named
- files. Files implementing models often have ``model`` in their filenames
- or they may live in a Python subpackage of your application package named
- ``models`` (as we've done in this tutorial), but this is only by convention.
+ modules. Modules implementing models often have ``model`` in their
+ names or they may live in a Python subpackage of your application package
+ named ``models`` (as we've done in this tutorial), but this is only a
+ convention and not a requirement.
-Open the ``tutorial/tutorial/models/mymodel.py`` file and edit it to look like
+Open the ``tutorial/models/mymodel.py`` file and edit it to look like
the following:
.. literalinclude:: src/models/tutorial/models/mymodel.py
@@ -59,7 +60,7 @@ Edit ``models/__init__.py``
Since we are using a package for our models, we also need to update our
``__init__.py`` file.
-Open the ``tutorial/tutorial/models/__init__.py`` file and edit it to look like
+Open the ``tutorial/models/__init__.py`` file and edit it to look like
the following:
.. literalinclude:: src/models/tutorial/models/__init__.py
@@ -84,7 +85,7 @@ Since we've changed our model, we need to make changes to our
to create a ``Page`` rather than a ``MyModel`` and add it to our
``DBSession``.
-Open ``tutorial/tutorial/scripts/initializedb.py`` and edit it to look like
+Open ``tutorial/scripts/initializedb.py`` and edit it to look like
the following:
.. literalinclude:: src/models/tutorial/scripts/initializedb.py
diff --git a/docs/tutorials/wiki2/definingviews.rst b/docs/tutorials/wiki2/definingviews.rst
index 08fa8f16b..8660c2772 100644
--- a/docs/tutorials/wiki2/definingviews.rst
+++ b/docs/tutorials/wiki2/definingviews.rst
@@ -67,7 +67,7 @@ like this::
Adding view functions in ``views/default.py``
=============================================
-It's time for a major change. Open ``tutorial/tutorial/views/default.py`` and
+It's time for a major change. Open ``tutorial/views/default.py`` and
edit it to look like the following:
.. literalinclude:: src/views/tutorial/views/default.py
@@ -243,7 +243,7 @@ as such.
The ``view.jinja2`` template
----------------------------
-Create ``tutorial/tutorial/templates/view.jinja2`` and add the following
+Create ``tutorial/templates/view.jinja2`` and add the following
content:
.. literalinclude:: src/views/tutorial/templates/view.jinja2
@@ -263,7 +263,7 @@ wiki page. It includes:
The ``edit.jinja2`` template
----------------------------
-Create ``tutorial/tutorial/templates/edit.jinja2`` and add the following
+Create ``tutorial/templates/edit.jinja2`` and add the following
content:
.. literalinclude:: src/views/tutorial/templates/edit.jinja2