summaryrefslogtreecommitdiff
path: root/docs/api/view.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-02-22 19:24:09 -0500
committerChris McDonough <chrism@plope.com>2012-02-22 19:24:09 -0500
commita7fe30f0eabd6c6fd3bcc910faa41720a75056de (patch)
tree6a34903cffb35eac455614b9fd6d1700e24d58b1 /docs/api/view.rst
parent2d045891789c58856831dc676d06c0b86fdd84c5 (diff)
downloadpyramid-a7fe30f0eabd6c6fd3bcc910faa41720a75056de.tar.gz
pyramid-a7fe30f0eabd6c6fd3bcc910faa41720a75056de.tar.bz2
pyramid-a7fe30f0eabd6c6fd3bcc910faa41720a75056de.zip
- New API: ``pyramid.config.Configurator.add_forbidden_view``. This is a
wrapper for ``pyramid.Config.configurator.add_view`` which does the right thing about permissions. It should be preferred over calling ``add_view`` directly with ``context=HTTPForbidden`` as was previously recommended. - New API: ``pyramid.view.forbidden_view_config``. This is a decorator constructor like ``pyramid.view.view_config`` that calls ``pyramid.config.Configurator.add_forbidden_view`` when scanned. It should be preferred over using ``pyramid.view.view_config`` with ``context=HTTPForbidden`` as was previously recommended. - Updated the "Creating a Not Forbidden View" section of the "Hooks" chapter, replacing explanations of registering a view using ``add_view`` or ``view_config`` with ones using ``add_forbidden_view`` or ``forbidden_view_config``. - Updated all tutorials to use ``pyramid.view.forbidden_view_config`` rather than ``pyramid.view.view_config`` with an HTTPForbidden context.
Diffstat (limited to 'docs/api/view.rst')
-rw-r--r--docs/api/view.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/api/view.rst b/docs/api/view.rst
index cb269e48e..21d2bb90d 100644
--- a/docs/api/view.rst
+++ b/docs/api/view.rst
@@ -22,6 +22,9 @@
.. autoclass:: notfound_view_config
:members:
+ .. autoclass:: forbidden_view_config
+ :members:
+
.. autoclass:: static
:members:
:inherited-members: