Chris McDonough
2012-02-23 a7fe30f0eabd6c6fd3bcc910faa41720a75056de
refs
author Chris McDonough <chrism@plope.com>
Thursday, February 23, 2012 01:24 +0100
committer Chris McDonough <chrism@plope.com>
Thursday, February 23, 2012 01:24 +0100
commita7fe30f0eabd6c6fd3bcc910faa41720a75056de
tree 6a34903cffb35eac455614b9fd6d1700e24d58b1 tree | zip | gz
parent 2d045891789c58856831dc676d06c0b86fdd84c5 view | diff
- 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.
1 files added
17 files modified
471 ■■■■ changed files
CHANGES.txt 45 ●●●● diff | view | raw | blame | history
TODO.txt 2 ●●●●● diff | view | raw | blame | history
docs/api/config.rst 1 ●●●● diff | view | raw | blame | history
docs/api/view.rst 3 ●●●●● diff | view | raw | blame | history
docs/narr/hooks.rst 29 ●●●● diff | view | raw | blame | history
docs/tutorials/wiki/authorization.rst 28 ●●●● diff | view | raw | blame | history
docs/tutorials/wiki/src/authorization/tutorial/views.py 8 ●●●●● diff | view | raw | blame | history
docs/tutorials/wiki/src/tests/tutorial/views.py 8 ●●●●● diff | view | raw | blame | history
docs/tutorials/wiki2/authorization.rst 26 ●●●● diff | view | raw | blame | history
docs/tutorials/wiki2/src/authorization/tutorial/views.py 8 ●●●●● diff | view | raw | blame | history
docs/tutorials/wiki2/src/tests/tutorial/views.py 8 ●●●●● diff | view | raw | blame | history
docs/whatsnew-1.3.rst 46 ●●●● diff | view | raw | blame | history
pyramid/config/views.py 86 ●●●●● diff | view | raw | blame | history
pyramid/tests/pkgs/forbiddenview/__init__.py 31 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_config/test_views.py 24 ●●●● diff | view | raw | blame | history
pyramid/tests/test_integration.py 9 ●●●●● diff | view | raw | blame | history
pyramid/tests/test_view.py 44 ●●●●● diff | view | raw | blame | history
pyramid/view.py 65 ●●●●● diff | view | raw | blame | history