diff options
| author | Donald Stufft <donald@stufft.io> | 2015-03-15 15:18:51 -0400 |
|---|---|---|
| committer | Donald Stufft <donald@stufft.io> | 2015-03-15 15:37:37 -0400 |
| commit | 12b6f58956a50a0ad8e6d9971a0248d8f7997122 (patch) | |
| tree | fea81456681b1a663e2fce8a319f77d58d9e8412 /docs/narr/urldispatch.rst | |
| parent | 8943131aa7678d26ef7cdd135001a54828c349d6 (diff) | |
| download | pyramid-12b6f58956a50a0ad8e6d9971a0248d8f7997122.tar.gz pyramid-12b6f58956a50a0ad8e6d9971a0248d8f7997122.tar.bz2 pyramid-12b6f58956a50a0ad8e6d9971a0248d8f7997122.zip | |
Allow passing a custom redirect class for appending slashes
Diffstat (limited to 'docs/narr/urldispatch.rst')
| -rw-r--r-- | docs/narr/urldispatch.rst | 4 |
1 files changed, 3 insertions, 1 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: |
