summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki
diff options
context:
space:
mode:
authorgoodwillcoding <goodwillcoding@webhippo.net>2013-01-22 09:57:51 -0800
committergoodwillcoding <goodwillcoding@webhippo.net>2013-01-22 09:57:51 -0800
commitf9bb5acdef3322e549512ad721b2c351c0064e71 (patch)
tree8da2fd079e9f601aa33c8b9ba79e73095cf3f7ac /docs/tutorials/wiki
parent10f6c5a129cab1cb9f067ed7e0287585af2fc329 (diff)
parentf1134866e8ca96e1309dca930bd5345233748659 (diff)
downloadpyramid-f9bb5acdef3322e549512ad721b2c351c0064e71.tar.gz
pyramid-f9bb5acdef3322e549512ad721b2c351c0064e71.tar.bz2
pyramid-f9bb5acdef3322e549512ad721b2c351c0064e71.zip
Merge pull request #812 from stevepiercy/master
etc. is an abbreviation thank you
Diffstat (limited to 'docs/tutorials/wiki')
-rw-r--r--docs/tutorials/wiki/background.rst2
-rw-r--r--docs/tutorials/wiki/basiclayout.rst26
-rw-r--r--docs/tutorials/wiki/definingmodels.rst4
-rw-r--r--docs/tutorials/wiki/design.rst8
-rw-r--r--docs/tutorials/wiki/installation.rst9
5 files changed, 24 insertions, 25 deletions
diff --git a/docs/tutorials/wiki/background.rst b/docs/tutorials/wiki/background.rst
index ac337abd5..6bbd5026e 100644
--- a/docs/tutorials/wiki/background.rst
+++ b/docs/tutorials/wiki/background.rst
@@ -11,7 +11,7 @@ Python web framework experience.
To code along with this tutorial, the developer will need a UNIX
machine with development tools (Mac OS X with XCode, any Linux or BSD
-variant, etc) *or* a Windows system of any kind.
+variant, etc.) *or* a Windows system of any kind.
.. warning::
diff --git a/docs/tutorials/wiki/basiclayout.rst b/docs/tutorials/wiki/basiclayout.rst
index 756a4b3b5..f9d4775ad 100644
--- a/docs/tutorials/wiki/basiclayout.rst
+++ b/docs/tutorials/wiki/basiclayout.rst
@@ -4,7 +4,7 @@ Basic Layout
The starter files generated by the ``zodb`` scaffold are basic, but
they provide a good orientation for the high-level patterns common to most
-:term:`traversal` -based :app:`Pyramid` (and :term:`ZODB` based) projects.
+:term:`traversal` -based :app:`Pyramid` (and :term:`ZODB` -based) projects.
Application Configuration with ``__init__.py``
@@ -12,8 +12,8 @@ Application Configuration with ``__init__.py``
A directory on disk can be turned into a Python :term:`package` by containing
an ``__init__.py`` file. Even if empty, this marks a directory as a Python
-package. Our application uses ``__init__.py`` as both a package marker, as
-well as to contain application configuration code.
+package. Our application uses ``__init__.py`` both as a package marker and
+to contain application configuration code.
When you run the application using the ``pserve`` command using the
``development.ini`` generated config file, the application configuration
@@ -28,14 +28,14 @@ point happens to be the ``main`` function within the file named
#. *Lines 1-3*. Perform some dependency imports.
-#. *Lines 6-8* Define a root factory for our Pyramid application.
+#. *Lines 6-8*. Define a root factory for our Pyramid application.
#. *Line 14*. We construct a :term:`Configurator` with a :term:`root
factory` and the settings keywords parsed by :term:`PasteDeploy`. The root
factory is named ``root_factory``.
-#. *Line 15*. Register a 'static view' which answers requests which start
- with URL path ``/static`` using the
+#. *Line 15*. Register a "static view" which answers requests whose URL path
+ start with ``/static`` using the
:meth:`pyramid.config.Configurator.add_static_view method`. This
statement registers a view that will serve up static assets, such as CSS
and image files, for us, in this case, at
@@ -44,16 +44,16 @@ point happens to be the ``main`` function within the file named
will be ``/static``. The second argument of this tag is the "path",
which is a relative :term:`asset specification`, so it finds the resources
it should serve within the ``static`` directory inside the ``tutorial``
- package. The scaffold could have alternately used an *absolute* asset
- specification as the path (``tutorial:static``) but it does not.
+ package. Alternatively the scaffold could have used an *absolute* asset
+ specification as the path (``tutorial:static``).
#. *Line 16*. Perform a :term:`scan`. A scan will find :term:`configuration
- decoration`, such as view configuration decorators (e.g. ``@view_config``)
+ decoration`, such as view configuration decorators (e.g., ``@view_config``)
in the source code of the ``tutorial`` package and will take actions based
on these decorators. We don't pass any arguments to
:meth:`~pyramid.config.Configurator.scan`, which implies that the scan
should take place in the current package (in this case, ``tutorial``).
- The scaffold could have equivalently said ``config.scan('tutorial')`` but
+ The scaffold could have equivalently said ``config.scan('tutorial')``, but
it chose to omit the package name argument.
#. *Line 17*. Use the
@@ -70,7 +70,7 @@ tree represents the site structure, but it *also* represents the
:term:`domain model` of the application, because each resource is a node
stored persistently in a :term:`ZODB` database. The ``models.py`` file is
where the ``zodb`` scaffold put the classes that implement our
-resource objects, each of which happens also to be a domain model object.
+resource objects, each of which also happens to be a domain model object.
Here is the source for ``models.py``:
@@ -79,7 +79,7 @@ Here is the source for ``models.py``:
:language: py
#. *Lines 4-5*. The ``MyModel`` :term:`resource` class is implemented here.
- Instances of this class will be capable of being persisted in :term:`ZODB`
+ Instances of this class are capable of being persisted in :term:`ZODB`
because the class inherits from the
:class:`persistent.mapping.PersistentMapping` class. The ``__parent__``
and ``__name__`` are important parts of the :term:`traversal` protocol.
@@ -137,7 +137,7 @@ Let's try to understand the components in this module:
indeed if you look in the ``templates`` directory of this package, you'll
see a ``mytemplate.pt`` template file, which renders the default home page
of the generated project. This asset specification is *relative* (to the
- view.py's current package). We could have alternately an used the
+ view.py's current package). Alternatively we could have used the
absolute asset specification ``tutorial:templates/mytemplate.pt``, but
chose to use the relative version.
diff --git a/docs/tutorials/wiki/definingmodels.rst b/docs/tutorials/wiki/definingmodels.rst
index 1d2710975..49372179f 100644
--- a/docs/tutorials/wiki/definingmodels.rst
+++ b/docs/tutorials/wiki/definingmodels.rst
@@ -33,7 +33,7 @@ Edit ``models.py``
.. note::
There is nothing automagically special about the filename ``models.py``. A
- project may have many models throughout its codebase in arbitrarily-named
+ 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``, but this is only by convention.
@@ -56,7 +56,7 @@ of the root model is also always ``None``.
Then we'll add a ``Page`` class. This class should inherit from the
:class:`persistent.Persistent` class. We'll also give it an ``__init__``
method that accepts a single parameter named ``data``. This parameter will
-contain the :term:`ReStructuredText` body representing the wiki page content.
+contain the :term:`reStructuredText` body representing the wiki page content.
Note that ``Page`` objects don't have an initial ``__name__`` or
``__parent__`` attribute. All objects in a traversal graph must have a
``__name__`` and a ``__parent__`` attribute. We don't specify these here
diff --git a/docs/tutorials/wiki/design.rst b/docs/tutorials/wiki/design.rst
index b44ccb10e..eb785dd1c 100644
--- a/docs/tutorials/wiki/design.rst
+++ b/docs/tutorials/wiki/design.rst
@@ -4,7 +4,7 @@ Design
Following is a quick overview of our wiki application, to help
us understand the changes that we will be doing next in our
-default files generated by the ``zodb`` scafffold.
+default files generated by the ``zodb`` scaffold.
Overall
-------
@@ -37,8 +37,8 @@ Views
-----
There will be three views to handle the normal operations of adding,
-editing and viewing wiki pages, plus one view for the wiki front page.
-Two templates will be used, one for viewing, and one for both for adding
+editing, and viewing wiki pages, plus one view for the wiki front page.
+Two templates will be used, one for viewing, and one for both adding
and editing wiki pages.
The default templating systems in :app:`Pyramid` are
@@ -57,7 +57,7 @@ use to do this are below.
corresponding passwords.
- GROUPS, a dictionary mapping usernames to a
- list of groups they belong to.
+ list of groups to which they belong to.
- ``groupfinder``, an *authorization callback* that looks up
USERS and GROUPS. It will be provided in a new
diff --git a/docs/tutorials/wiki/installation.rst b/docs/tutorials/wiki/installation.rst
index 488ab1883..b545cdba0 100644
--- a/docs/tutorials/wiki/installation.rst
+++ b/docs/tutorials/wiki/installation.rst
@@ -193,8 +193,7 @@ assumptions:
.. note::
- :app:`Pyramid` supports any persistent storage mechanism (e.g. a SQL
- database or filesystem files, etc). :app:`Pyramid` also supports an
- additional mechanism to map URLs to code (:term:`URL dispatch`). However,
- for the purposes of this tutorial, we'll only be using traversal and ZODB.
-
+ :app:`Pyramid` supports any persistent storage mechanism (e.g., a SQL
+ database or filesystem files). :app:`Pyramid` also supports an additional
+ mechanism to map URLs to code (:term:`URL dispatch`). However, for the
+ purposes of this tutorial, we'll only be using traversal and ZODB.