summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2013-03-12 13:44:12 -0700
committerMichael Merickel <michael@merickel.org>2013-03-12 13:44:12 -0700
commit22814bb5613546fee0aeec59526ec9c10ae7ac6b (patch)
tree93019973b2267877e38c7e518c1616fb704f7df7 /docs
parent40aeaa4d789f068ddaa10768068f2b88d075960f (diff)
parent2dfdecd4c7a8255702aa08f2807b4a3341b270f7 (diff)
downloadpyramid-22814bb5613546fee0aeec59526ec9c10ae7ac6b.tar.gz
pyramid-22814bb5613546fee0aeec59526ec9c10ae7ac6b.tar.bz2
pyramid-22814bb5613546fee0aeec59526ec9c10ae7ac6b.zip
Merge pull request #888 from tshepang/fixes
miscellaneous doc fixes
Diffstat (limited to 'docs')
-rw-r--r--docs/glossary.rst2
-rw-r--r--docs/narr/advconfig.rst2
-rw-r--r--docs/narr/commandline.rst2
-rw-r--r--docs/narr/environment.rst2
-rw-r--r--docs/narr/logging.rst2
-rw-r--r--docs/narr/urldispatch.rst4
-rw-r--r--docs/narr/views.rst42
7 files changed, 28 insertions, 28 deletions
diff --git a/docs/glossary.rst b/docs/glossary.rst
index 9220e6b5f..d6adaa787 100644
--- a/docs/glossary.rst
+++ b/docs/glossary.rst
@@ -18,7 +18,7 @@ Glossary
response
An object returned by a :term:`view callable` that represents response
- data returned to the requesting user agent. It must implements the
+ data returned to the requesting user agent. It must implement the
:class:`pyramid.interfaces.IResponse` interface. A response object is
typically an instance of the :class:`pyramid.response.Response` class or
a subclass such as :class:`pyramid.httpexceptions.HTTPFound`. See
diff --git a/docs/narr/advconfig.rst b/docs/narr/advconfig.rst
index ba43f3ea6..434e2bd6c 100644
--- a/docs/narr/advconfig.rst
+++ b/docs/narr/advconfig.rst
@@ -417,7 +417,7 @@ added in configuration execution order.
More Information
----------------
-For more information, see the article,`"A Whirlwind Tour of Advanced
+For more information, see the article, `"A Whirlwind Tour of Advanced
Configuration Tactics"
<http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/configuration/whirlwind_tour.html>`_,
in the Pyramid Cookbook.
diff --git a/docs/narr/commandline.rst b/docs/narr/commandline.rst
index 5c4d58548..3fa3a1291 100644
--- a/docs/narr/commandline.rst
+++ b/docs/narr/commandline.rst
@@ -399,7 +399,7 @@ Here's the application configuration section of the ``development.ini`` used
by the above ``ptweens`` command which reports that the explicit tween chain
is used:
-.. code-block:: text
+.. code-block:: ini
:linenos:
[app:main]
diff --git a/docs/narr/environment.rst b/docs/narr/environment.rst
index fb3c3d7e3..c8a666b90 100644
--- a/docs/narr/environment.rst
+++ b/docs/narr/environment.rst
@@ -212,7 +212,7 @@ sequence can take several different forms.
package1 package2 package3
- The package names can also be separated by carriage returns::
+ The package names can also be separated by carriage returns::
package1
package2
diff --git a/docs/narr/logging.rst b/docs/narr/logging.rst
index f4d1d051d..6492bf371 100644
--- a/docs/narr/logging.rst
+++ b/docs/narr/logging.rst
@@ -334,7 +334,7 @@ To this:
mypyramidapp
Using PasteDeploy this way to form and serve a pipeline is equivalent to
-wrapping your app in a TransLogger instance via the bottom the ``main``
+wrapping your app in a TransLogger instance via the bottom of the ``main``
function of your project's ``__init__`` file:
.. code-block:: python
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst
index 2a7adea81..b8aa9280f 100644
--- a/docs/narr/urldispatch.rst
+++ b/docs/narr/urldispatch.rst
@@ -70,8 +70,8 @@ via its ``route_name`` predicate, that view callable will always be found and
invoked when the associated route pattern matches during a request.
More commonly, you will not use any ``add_view`` statements in your project's
-"setup" code, instead only using ``add_route`` statements using a
-:term:`scan` for to associate view callables with routes. For example, if
+"setup" code. You will instead use ``add_route`` statements, and use a
+:term:`scan` to associate view callables with routes. For example, if
this is a portion of your project's ``__init__.py``:
.. code-block:: python
diff --git a/docs/narr/views.rst b/docs/narr/views.rst
index 8ebdfe219..90f6825c0 100644
--- a/docs/narr/views.rst
+++ b/docs/narr/views.rst
@@ -264,9 +264,9 @@ also be used by application developers to convert arbitrary exceptions to
responses.
To register a view that should be called whenever a particular exception is
-raised from with :app:`Pyramid` view code, use the exception class or one of
-its superclasses as the ``context`` of a view configuration which points at a
-view callable you'd like to generate a response.
+raised from within :app:`Pyramid` view code, use the exception class (or one of
+its superclasses) as the :term:`context` of a view configuration which points
+at a view callable you'd like to generate a response for.
For example, given the following exception class in a module named
``helloworld.exceptions``:
@@ -537,41 +537,41 @@ The following types work as view callables in this style:
e.g.:
.. code-block:: python
- :linenos:
+ :linenos:
- from pyramid.response import Response
+ from pyramid.response import Response
- def view(context, request):
- return Response('OK')
+ def view(context, request):
+ return Response('OK')
#. Classes that have an ``__init__`` method that accepts ``context,
request`` and a ``__call__`` method which accepts no arguments, e.g.:
.. code-block:: python
- :linenos:
+ :linenos:
- from pyramid.response import Response
+ from pyramid.response import Response
- class view(object):
- def __init__(self, context, request):
- self.context = context
- self.request = request
+ class view(object):
+ def __init__(self, context, request):
+ self.context = context
+ self.request = request
- def __call__(self):
- return Response('OK')
+ def __call__(self):
+ return Response('OK')
#. Arbitrary callables that have a ``__call__`` method that accepts
``context, request``, e.g.:
.. code-block:: python
- :linenos:
+ :linenos:
- from pyramid.response import Response
+ from pyramid.response import Response
- class View(object):
- def __call__(self, context, request):
- return Response('OK')
- view = View() # this is the view callable
+ class View(object):
+ def __call__(self, context, request):
+ return Response('OK')
+ view = View() # this is the view callable
This style of calling convention is most useful for :term:`traversal` based
applications, where the context object is frequently used within the view