From d95cd9b81d4e536c1e7f6f84457deb2fb34f1ea3 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 2 Jan 2011 19:26:42 -0500 Subject: - Allow static renderer provided during view registration to be overridden at request time via a request attribute named ``override_renderer``, which should be the name of a registered renderer. Useful to provide "omnipresent" RPC for existing views. - Convert ``add_view_mapper`` to ``set_view_mapper``. There will only be a single default view mapper. We no longer register named utilities for view mappers to provide alternates. - Previoulsy the ``view_mapper`` argument was required to be the *name* of an existing registered view mapper. We no longer register named utilities for view mappers, so now if an extension wants to override the view mapper used for a particular view registration, it can use the dotted name to a view mapper class or provide that class as ``view_mapper``. --- CHANGES.txt | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'CHANGES.txt') diff --git a/CHANGES.txt b/CHANGES.txt index 4279f950d..ec631cc78 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,22 +15,6 @@ Features - ``config.add_view`` now accepts a ``decorator`` keyword argument, a callable which will decorate the view callable before it is added to the registry. -- add a ``add_view_mapper`` API to Configurator. This API allows you to add - a named implementation of a ``pyramid.interfaces.IViewMapperFactory`` - interface. Its name can be passed as a ``view_mapper`` argument to - ``config.add_view``. A view mapper allows objects that are meant to be - used as view callables to have an arbitrary argument list and an arbitrary - result. This feature will be used by Pyramid extension developers, not by - "civilians". - -- New constructor argument to Configurator: ``default_view_mapper``. Useful - to create systems that have view callables with alternate default calling - conventions. - -- ``config.add_view`` now accepts a ``view_mapper`` keyword argument, which - should either be ``None`` or the name of a view mapper previously - registered via ``add_view_mapper``. - - If a handler class provides an ``__action_decorator__`` attribute (usually a classmethod or staticmethod), use that as the decorator for each view registration for that handler. @@ -55,6 +39,27 @@ Features This class can be used by third-party authentication policy developers to help in the mechanics of authentication cookie-setting. +- New constructor argument to Configurator: ``default_view_mapper``. Useful + to create systems that have alternate view calling conventions. A view + mapper allows objects that are meant to be used as view callables to have + an arbitrary argument list and an arbitrary result. The object passed as + ``default_view_mapper`` should implement the + ``pyramid.interfaces.IViewMapperFactory`` interface. + +- add a ``set_view_mapper`` API to Configurator. Has + the same result as passing ``default_view_mapper`` to the Configurator + constructor. + +- ``config.add_view`` now accepts a ``view_mapper`` keyword argument, which + should either be ``None``, a string representing a Python dotted name, or + an object which is an ``IViewMapperFactory``. This feature is not useful + for "civilians", only for extension writers. + +- Allow static renderer provided during view registration to be overridden at + request time via a request attribute named ``override_renderer``, which + should be the name of a previously registered renderer. Useful to provide + "omnipresent" RPC using existing rendered views. + Backwards Incompatibilities --------------------------- -- cgit v1.2.3