From 8818ea59e253b855e1b0f09b856560cb71c9e8de Mon Sep 17 00:00:00 2001 From: Robert Jackiewicz Date: Mon, 12 Nov 2012 12:27:23 -0500 Subject: Modified the hooks documentation to currently describe how to access the context in a forbidden view. --- docs/narr/hooks.rst | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index 96fa77a07..ea75e5fe4 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -180,11 +180,14 @@ as a forbidden view: config.scan() Like any other view, the forbidden view must accept at least a ``request`` -parameter, or both ``context`` and ``request``. The ``context`` (available -as ``request.context`` if you're using the request-only view argument -pattern) is the context found by the router when the view invocation was -denied. The ``request`` is the current :term:`request` representing the -denied action. +parameter, or both ``context`` and ``request``. If a forbidden view +callable accepts both ``context`` and ``request``, the HTTP Exception is passed +as context. The ``context`` as found by the router when view was +denied (that you normally would expect) is available as +``request.context``. The ``request`` is the current :term:`request` +representing the denied action. + + Here's some sample code that implements a minimal forbidden view: -- cgit v1.2.3 From 18a9aed5810a5680fc027b8c55c10bd67616d1b0 Mon Sep 17 00:00:00 2001 From: Robert Jackiewicz Date: Mon, 12 Nov 2012 12:47:23 -0500 Subject: Added changes to the CHANGES log. --- CHANGES.txt | 7 +++++++ CONTRIBUTORS.txt | 2 ++ 2 files changed, 9 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index e40312c34..c28597f0e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,6 +81,13 @@ Internals because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. +Documentation +------------- + +- Updated the hooks narrative documentation to reflect the fact that + the context passed into the view callable is actually the instance of + Exception called when a Forbidden Exception is envoked + 1.4a3 (2012-10-26) ================== diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index d03da3e62..34d904d0f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -188,3 +188,5 @@ Contributors - Domen Kozar, 2012/09/11 - David Gay, 2012/09/16 + +- Robert Jackiewicz, 2012/11/12 -- cgit v1.2.3 From fd77b5c78677109c7756a690d0e4be43895ae12a Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 12 Nov 2012 11:54:01 -0600 Subject: removed doc-update from changelog --- CHANGES.txt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index c28597f0e..e40312c34 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -81,13 +81,6 @@ Internals because that package should never be imported from non-Pyramid code. TopologicalSorter is still not an API, but may become one. -Documentation -------------- - -- Updated the hooks narrative documentation to reflect the fact that - the context passed into the view callable is actually the instance of - Exception called when a Forbidden Exception is envoked - 1.4a3 (2012-10-26) ================== -- cgit v1.2.3 From 01c76b8bf509bbad41336d00d832241e7e02aa9e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 13 Nov 2012 17:41:45 -0500 Subject: forward port from 1.3 branch --- docs/whatsnew-1.3.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/whatsnew-1.3.rst b/docs/whatsnew-1.3.rst index d90897d16..14db1fe15 100644 --- a/docs/whatsnew-1.3.rst +++ b/docs/whatsnew-1.3.rst @@ -486,6 +486,11 @@ Deprecations was designed to offer in Pylons. It will continue to exist "forever" but it will not be recommended or mentioned in the docs. +- Remove references to do-nothing ``pyramid.debug_templates`` setting in all + Pyramid-provided .ini files. This setting previously told Chameleon to render + better exceptions; now Chameleon always renders nice exceptions regardless of + the value of this setting. + Known Issues ------------ -- cgit v1.2.3