summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2014-05-05 23:56:09 -0400
committerChris McDonough <chrism@plope.com>2014-05-05 23:56:09 -0400
commit7423971bf8aaa5fd205778820d91a6c7e3cea1bd (patch)
tree35130316c871ff0d8c41c3ad57a5f5cc1d876c7c /docs/narr
parent7a6bf6f0ff1b85d0158ad49fc21037db4999c1cf (diff)
parentf9bc568657f316f20b5f576085472b80dec15cba (diff)
downloadpyramid-7423971bf8aaa5fd205778820d91a6c7e3cea1bd.tar.gz
pyramid-7423971bf8aaa5fd205778820d91a6c7e3cea1bd.tar.bz2
pyramid-7423971bf8aaa5fd205778820d91a6c7e3cea1bd.zip
fix merge conflicts
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/configuration.rst1
-rw-r--r--docs/narr/install.rst28
-rw-r--r--docs/narr/viewconfig.rst13
-rw-r--r--docs/narr/webob.rst11
4 files changed, 31 insertions, 22 deletions
diff --git a/docs/narr/configuration.rst b/docs/narr/configuration.rst
index f7a69d613..52615533d 100644
--- a/docs/narr/configuration.rst
+++ b/docs/narr/configuration.rst
@@ -114,7 +114,6 @@ in a package and its subpackages. For example:
return Response('Hello')
if __name__ == '__main__':
- from pyramid.config import Configurator
config = Configurator()
config.scan()
app = config.make_wsgi_app()
diff --git a/docs/narr/install.rst b/docs/narr/install.rst
index e419a8b20..a825b61b9 100644
--- a/docs/narr/install.rst
+++ b/docs/narr/install.rst
@@ -15,8 +15,8 @@ You will need `Python <http://python.org>`_ version 2.6 or better to run
.. sidebar:: Python Versions
As of this writing, :app:`Pyramid` has been tested under Python 2.6, Python
- 2.7, Python 3.2, and Python 3.3. :app:`Pyramid` does not run under any
- version of Python before 2.6.
+ 2.7, Python 3.2, Python 3.3, Python 3.4 and PyPy 2.2. :app:`Pyramid` does
+ not run under any version of Python before 2.6.
:app:`Pyramid` is known to run on all popular UNIX-like systems such as Linux,
Mac OS X, and FreeBSD as well as on Windows platforms. It is also known to run
@@ -32,20 +32,22 @@ dependency will fall back to using pure Python instead.
For Mac OS X Users
~~~~~~~~~~~~~~~~~~
-From `Python.org <http://python.org/download/mac/>`_:
+Python comes pre-installed on Mac OS X, but due to Apple's release cycle,
+it is often out of date. Unless you have a need for a specific earlier version,
+it is recommended to install the latest 2.x or 3.x version of Python.
- Python comes pre-installed on Mac OS X, but due to Apple's release cycle,
- it's often one or even two years old. The overwhelming recommendation of
- the "MacPython" community is to upgrade your Python by downloading and
- installing a newer version from `the Python standard release page
- <http://python.org/download/releases/>`_.
+You can install the latest verion of Python for Mac OS X from the binaries on
+`python.org <https://www.python.org/download/mac/>`_.
-It is recommended to download one of the *installer* versions, unless you
-prefer to install your Python through a packgage manager (e.g., macports or
-homebrew) or to build your Python from source.
+Alternatively, you can use the `homebrew <http://brew.sh/>`_ package manager.
-Unless you have a need for a specific earlier version, it is recommended to
-install the latest 2.x or 3.x version of Python.
+.. code-block:: text
+
+ # for python 2.7
+ $ brew install python
+
+ # for python 3.4
+ $ brew install python3
If you use an installer for your Python, then you can skip to the section
:ref:`installing_unix`.
diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst
index adc53bd11..a0feef8d7 100644
--- a/docs/narr/viewconfig.rst
+++ b/docs/narr/viewconfig.rst
@@ -295,11 +295,14 @@ configured view.
*This is an advanced feature, not often used by "civilians"*.
``request_method``
- This value can be a string (typically ``"GET"``, ``"POST"``, ``"PUT"``,
- ``"DELETE"``, or ``"HEAD"``) representing an HTTP ``REQUEST_METHOD``. A view
- declaration with this argument ensures that the view will only be called
- when the request's ``method`` attribute (aka the ``REQUEST_METHOD`` of the
- WSGI environment) string matches the supplied value.
+ This value can be either a string (such as ``"GET"``, ``"POST"``,
+ ``"PUT"``, ``"DELETE"``, ``"HEAD"`` or ``"OPTIONS"``) representing an
+ HTTP ``REQUEST_METHOD``, or a tuple containing one or more of these
+ strings. A view declaration with this argument ensures that the
+ view will only be called when the ``method`` attribute of the
+ request (aka the ``REQUEST_METHOD`` of the WSGI environment) matches
+ a supplied value. Note that use of ``"GET"`` also implies that the
+ view will respond to ``"HEAD"`` as of Pyramid 1.4.
If ``request_method`` is not supplied, the view will be invoked regardless
of the ``REQUEST_METHOD`` of the :term:`WSGI` environment.
diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst
index f0a4b5a0b..6a331e4bf 100644
--- a/docs/narr/webob.rst
+++ b/docs/narr/webob.rst
@@ -408,6 +408,8 @@ Here are some highlights:
The content type *not* including the ``charset`` parameter.
Typical use: ``response.content_type = 'text/html'``.
+ Default value: ``response.content_type = 'text/html'``.
+
``response.charset``:
The ``charset`` parameter of the content-type, it also informs
encoding in ``response.unicode_body``.
@@ -466,9 +468,12 @@ argument to the class; e.g.:
from pyramid.response import Response
response = Response(body='hello world!', content_type='text/plain')
-The status defaults to ``'200 OK'``. The content_type does not default to
-anything, though if you subclass :class:`pyramid.response.Response` and set
-``default_content_type`` you can override this behavior.
+The status defaults to ``'200 OK'``.
+
+The value of content_type defaults to
+``webob.response.Response.default_content_type``; which is `text/html`.
+You can subclass :class:`pyramid.response.Response` and set
+``default_content_type`` to override this behavior.
.. index::
single: exception responses