From 3a61a378e03ae3a5b44ce326aac56b159a15bfa1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 30 Sep 2009 04:15:39 +0000 Subject: - For behavior like Django's ``APPEND_SLASH=True``, use the ``repoze.bfg.view.append_slash_notfound_view`` view as the Not Found view in your application. When this view is the Not Found view (indicating that no view was found), and any routes have been defined in the configuration of your application, 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 path, do an HTTP redirect to the slash-appended PATH_INFO. Note that this will *lose* ``POST`` data information (turning it into a GET), so you shouldn't rely on this to redirect POST requests. --- docs/api/view.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/api') diff --git a/docs/api/view.rst b/docs/api/view.rst index 40c69d24b..e345a0015 100644 --- a/docs/api/view.rst +++ b/docs/api/view.rst @@ -19,3 +19,6 @@ .. autoclass:: static :members: + .. autofunction:: append_slash_notfound_view + + -- cgit v1.2.3