summaryrefslogtreecommitdiff
path: root/docs/zcml/forbidden.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2010-04-14 02:49:19 +0000
committerChris McDonough <chrism@agendaless.com>2010-04-14 02:49:19 +0000
commitff1213e8f2aed987108ba57aed517c033491b1aa (patch)
treef531544c3373ae7d5b51746987cb373326277a9c /docs/zcml/forbidden.rst
parent2b6bc8adfa294f7133680f64df411251afb67dfc (diff)
downloadpyramid-ff1213e8f2aed987108ba57aed517c033491b1aa.tar.gz
pyramid-ff1213e8f2aed987108ba57aed517c033491b1aa.tar.bz2
pyramid-ff1213e8f2aed987108ba57aed517c033491b1aa.zip
Add "exception views" work contributed primarily by Andrey Popp by merging the "phash" branch.
Diffstat (limited to 'docs/zcml/forbidden.rst')
-rw-r--r--docs/zcml/forbidden.rst16
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/zcml/forbidden.rst b/docs/zcml/forbidden.rst
index bd2235ccf..5a52a05ab 100644
--- a/docs/zcml/forbidden.rst
+++ b/docs/zcml/forbidden.rst
@@ -9,6 +9,14 @@ view`. The default forbidden response has a 401 status code and is
very plain, but it can be overridden as necessary using the
``forbidden`` ZCML directive.
+.. warning::
+
+ The ``forbidden`` ZCML directive is deprecated in :mod:`repoze.bfg`
+ version 1.3. Instead, you should use the :ref:`view_directive`
+ directive with a ``context`` that names the
+ :exc:`repoze.bfg.exceptions.Forbidden` class. See
+ :ref:`changing_the_forbidden_view` form more information.
+
Attributes
~~~~~~~~~~
@@ -63,8 +71,12 @@ Example
Alternatives
~~~~~~~~~~~~
-The :meth:`repoze.bfg.configuration.Configurator.set_forbidden_view`
-method performs the same job as the ``forbidden`` ZCML directive.
+Use the :ref:`view_directive` directive with a ``context`` that names
+the :exc:`repoze.bfg.exceptions.Forbidden` class.
+
+Use the :meth:`repoze.bfg.configuration.Configurator.add_view` method,
+passing it a ``context`` which is the
+:exc:`repoze.bfg.exceptions.Forbidden` class.
See Also
~~~~~~~~