From 29f5c1a101802e0ba66d72195fbe4e9d340a96a0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 10 Dec 2009 15:54:43 +0000 Subject: - Added a "Special Exceptions" section to the "Views" narrative documentation chapter explaining the effect of raising ``repoze.bfg.exceptions.NotFound`` and ``repoze.bfg.exceptions.Forbidden`` from within view code. - When the ``repoze.bfg.exceptions.NotFound`` or ``repoze.bfg.exceptions.Forbidden`` error is raised from within a custom root factory or the ``factory`` of a route, the appropriate response is now sent to the requesting user agent (the result of the notfound view or the forbidden view, respectively). When these errors are raised from within a root factory, the ``context`` passed to the notfound or forbidden view will be ``None``. Also, the request will not be decorated with ``view_name``, ``subpath``, ``context``, etc. as would normally be the case if traversal had been allowed to take place. --- docs/glossary.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 491ad6d48..0fa827188 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -490,3 +490,22 @@ Glossary The configuration mode in which you use Python to call methods on a :term:`Configurator` in order to add each :term:`configuration declaration` required by your application. + Not Found View + The :term:`view callable` invoked by :mod:`repoze.bfg` when the + developer explicitly raises a + ``repoze.bfg.exceptions.NotFound`` exception from within + :term:`view` code or :term:`root factory` code, or when the + current request doesn't match any :term:`view configuration`. + :mod:`repoze.bfg` provides a default implementation of a not + found view; it can be overridden. See + :ref:`changing_the_notfound_view`. + Forbidden View + The :term:`view callable` invoked by :mod:`repoze.bfg` when the + developer explicitly raises a + ``repoze.bfg.exceptions.Forbidden`` exception from within + :term:`view` code or :term:`root factory` code, or when the the + :term:`view configuration` and :term:`authorization policy` found + for a request disallows a particular view invocation. + :mod:`repoze.bfg` provides a default implementation of a + forbidden view; it can be overridden. See + :ref:`changing_the_forbidden_view`. -- cgit v1.2.3