From 0196b2a06ef66d2e8b33a03cc84373ab84ba44be Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 6 Aug 2012 00:48:29 -0400 Subject: add docs for third-party view predicates --- CHANGES.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index ecb2bf659..5e0bf0968 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -20,6 +20,21 @@ Bug Fixes Features -------- +- Third-party custom view and route predicates can now be added for use by + view authors via ``pyramid.config.Configurator.add_view_predicate`` and + ``pyramid.config.Configurator.add_route_predicate``. So, for example, + doing this:: + + config.add_view_predicate('abc', my.package.ABCPredicate) + + Might allow a view author to do this in an application that configured that + predicate:: + + @view_config(abc=1) + + See "Adding A Third Party View or Route Predicate" in the Hooks chapter for + more information. + - Custom objects can be made easily JSON-serializable in Pyramid by defining a ``__json__`` method on the object's class. This method should return values natively serializable by ``json.dumps`` (such as ints, lists, -- cgit v1.2.3