diff options
| author | Chris McDonough <chrism@plope.com> | 2012-08-06 00:48:29 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-08-06 00:48:29 -0400 |
| commit | 0196b2a06ef66d2e8b33a03cc84373ab84ba44be (patch) | |
| tree | ce73c9ea253700c20dc2165dd427e38f8c3c5529 /CHANGES.txt | |
| parent | 859e947aae832194e1a22905898be9ebe05b20ed (diff) | |
| download | pyramid-0196b2a06ef66d2e8b33a03cc84373ab84ba44be.tar.gz pyramid-0196b2a06ef66d2e8b33a03cc84373ab84ba44be.tar.bz2 pyramid-0196b2a06ef66d2e8b33a03cc84373ab84ba44be.zip | |
add docs for third-party view predicates
Diffstat (limited to 'CHANGES.txt')
| -rw-r--r-- | CHANGES.txt | 15 |
1 files changed, 15 insertions, 0 deletions
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, |
