summaryrefslogtreecommitdiff
path: root/CHANGES.txt
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2013-03-19 00:22:37 -0700
committerMichael Merickel <michael@merickel.org>2013-03-19 00:22:37 -0700
commitb6a4d40d8fa14915413ac337f4b71e203257ca85 (patch)
tree9ba5b96af8204be308b511259bb717234d05c974 /CHANGES.txt
parentaae62a0ba0d4709b50fd5f2e0be86fd91080d014 (diff)
parent9e1e6d3f6d8e131afe102f60af3ca8f597b32745 (diff)
downloadpyramid-b6a4d40d8fa14915413ac337f4b71e203257ca85.tar.gz
pyramid-b6a4d40d8fa14915413ac337f4b71e203257ca85.tar.bz2
pyramid-b6a4d40d8fa14915413ac337f4b71e203257ca85.zip
Merge branch 'master' of latteier/pyramid into pull.786
Diffstat (limited to 'CHANGES.txt')
-rw-r--r--CHANGES.txt43
1 files changed, 43 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index ae2cafba4..2e96421ee 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -11,6 +11,49 @@ Features
a dynamic property. It is recommended to define a dynamic ACL as a callable
to avoid this ambiguity. See https://github.com/Pylons/pyramid/issues/735.
+Bug Fixes
+---------
+
+- View lookup will now search for valid views based on the inheritance
+ hierarchy of the context. It tries to find views based on the most
+ specific context first, and upon predicate failure, will move up the
+ inheritance chain to test views found by the super-type of the context.
+ In the past, only the most specific type containing views would be checked
+ and if no matching view could be found then a PredicateMismatch would be
+ raised. Now predicate mismatches don't hide valid views registered on
+ super-types. Here's an example that now works::
+
+ .. code-block:: python
+
+ class IResource(Interface):
+ ...
+
+ @view_config(context=IResource)
+ def get(context, request):
+ ...
+
+ @view_config(context=IResource, request_method='POST')
+ def post(context, request):
+ ...
+
+ @view_config(context=IResource, request_method='DELETE')
+ def delete(context, request):
+ ...
+
+ @implementor(IResource)
+ class MyResource:
+ ...
+
+ @view_config(context=MyResource, request_method='POST')
+ def override_post(context, request):
+ ...
+
+ Previously the override_post view registration would hide the get
+ and delete views in the context of MyResource -- leading to a
+ predicate mismatch error when trying to use GET or DELETE
+ methods. Now the views are found and no predicate mismatch is
+ raised.
+
1.4 (2012-12-18)
================