diff options
| author | Chris McDonough <chrism@plope.com> | 2015-03-15 15:40:35 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2015-03-15 15:40:35 -0400 |
| commit | 9a77daceedd9b1449876f53413e6437ca39fc965 (patch) | |
| tree | 2682a1298d0524c647a6736af807c85ccabb477a /docs | |
| parent | 8ebde50fdc7322e82b96ad103ab168b92ca2b74a (diff) | |
| parent | 0b527bab1b7745695475b894fdafed9480748b16 (diff) | |
| download | pyramid-9a77daceedd9b1449876f53413e6437ca39fc965.tar.gz pyramid-9a77daceedd9b1449876f53413e6437ca39fc965.tar.bz2 pyramid-9a77daceedd9b1449876f53413e6437ca39fc965.zip | |
Merge branch 'custom-append-slash-redirect' of https://github.com/dstufft/pyramid into dstufft-custom-append-slash-redirect
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/urldispatch.rst | 4 | ||||
| -rw-r--r-- | docs/tutorials/wiki/authorization.rst | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index ca6a55164..fa3e734fe 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -842,7 +842,9 @@ route. When configured, along with at least one other route in your application, this view will be invoked if the value of ``PATH_INFO`` does not already end in a slash, and if the value of ``PATH_INFO`` *plus* a slash matches any route's pattern. In this case it does an HTTP redirect to the -slash-appended ``PATH_INFO``. +slash-appended ``PATH_INFO``. In addition you may pass anything that implements +:class:`pyramid.interfaces.IResponse` which will then be used in place of the +default class (:class:`pyramid.httpexceptions.HTTPFound`). Let's use an example. If the following routes are configured in your application: diff --git a/docs/tutorials/wiki/authorization.rst b/docs/tutorials/wiki/authorization.rst index 93cd0c18e..6c98b6f3a 100644 --- a/docs/tutorials/wiki/authorization.rst +++ b/docs/tutorials/wiki/authorization.rst @@ -197,9 +197,9 @@ Add the following import statements to the head of ``tutorial/tutorial/views.py``: .. literalinclude:: src/authorization/tutorial/views.py - :lines: 6-13,15-17 + :lines: 6-17 :linenos: - :emphasize-lines: 3,6-9,11 + :emphasize-lines: 3,6-11 :language: python (Only the highlighted lines, with other necessary modifications, |
