summaryrefslogtreecommitdiff
path: root/pyramid
AgeCommit message (Collapse)Author
2011-01-02- Allow view callables to specify their preferred view mapper by respecting aChris McDonough
``__view_mapper__`` attribute. This setting can still be overridden by configuration-specified ``view_mapper`` argument to ``add_view``.
2011-01-02- Allow ``decorator=`` and ``view_mapper`` parameters to add_view andChris McDonough
``@view_config``.
2011-01-02allow _derive_view to pass all kwargs to ViewDeriver, pass 'package' from ↵Chris McDonough
add_view to view deriver
2011-01-02- Allow static renderer provided during view registration to be overridden atChris McDonough
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``.
2011-01-02fix oldstyle route syntaxChris McDonough
2011-01-02- add a ``add_view_mapper`` API to Configurator. This API allows you to addChris McDonough
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. - ``view_mapper`` argument to ``add_view`` should now be a view mapper *name* rather than an implementation. - Add ``view_mapper`` argument to ``view_config`` decorator constructor. - Remove (non-API) function of config.py named _map_view. - Fix docstring for ``decorator`` argument to add_view. - Factor invocation of view mapper into a viewderiver method. - Promote view rendering and decorating into viewderiver, out of view mapper. - Make requestonly into a function rather than a method of the default view mapper.
2011-01-01- The class ``pyramid.authentication.AuthTktCookieHelper`` is now an API.Chris McDonough
This class can be used by third-party authentication policy developers to help in the mechanics of authentication cookie-setting.
2010-12-31- The ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies anChris McDonough
``unauthenticated_userid`` method. This method supports an important optimization required by people who are using persistent storages which do not support object caching and whom want to create a "user object" as a request attribute. - A new API has been added to the ``pyramid.security`` module named ``unauthenticated_userid``. This API function calls the ``unauthenticated_userid`` method of the effective security policy. - An ``unauthenticated_userid`` method has been added to the dummy authentication policy returned by ``pyramid.config.Configurator.testing_securitypolicy``. It returns the same thing as that the dummy authentication policy's ``authenticated_userid`` method. - Since the ``pyramid.interfaces.IAuthenticationPolicy`` interface now specifies that a policy implementation must implement an ``unauthenticated_userid`` method, all third-party custom authentication policies now must implement this method. It, however, will only be called when the global function named ``pyramid.security.unauthenticated_userid`` is invoked, so if you're not invoking that, you will not notice any issues. - The (non-API) method of all internal authentication policy implementations previously named ``_get_userid`` is now named ``unauthenticated_userid``, promoted to an API method. If you were overriding this method, you'll now need to override it as ``unauthenticated_userid`` instead.
2010-12-31- A view callable wrapper registered in the registry now contains anChris McDonough
``__original_view__`` attribute which references the original view callable (or class).
2010-12-31Merge branch 'viewderiver'Chris McDonough
Conflicts: pyramid/config.py
2010-12-31use inbuilt PageTextTemplateFile rather than a hand-rolled subclass of ↵Chris McDonough
TemplateFile
2010-12-30clean up chameleon_zpt test setup and teardownChris McDonough
2010-12-30clean up chameleon text test setup and teardownChris McDonough
2010-12-30move translator out of method scope to make intent clear that its not a closureChris McDonough
2010-12-30Merge branch 'refs/heads/master' into viewderiverRob Miller
Conflicts: CONTRIBUTORS.txt
2010-12-31ReST formatting fix in Request class docstring.Marius Gedminas
2010-12-30typosChris McDonough
2010-12-30factor defaultviewmapper to dispatch in a slightly more readable wayChris McDonough
2010-12-30- The "view derivation" code is now factored into a set of classes ratherChris McDonough
than a large number of standalone functions (a side effect of the ``view_mapper`` refactoring). - The ``pyramid.renderer.RendererHelper`` class has grown a ``render_view`` method, which is used by the default view mapper (a side effect of the ``view_mapper`` refactoring). - The object passed as ``renderer`` to the "view deriver" is now an instance of ``pyramid.renderers.RendererHelper`` rather than a dictionary (a side effect of ``view_mapper`` refactoring).
2010-12-29make sure view returned from view mapper preserves all attrsChris McDonough
2010-12-29preserve_attrs->wraps_view, break out preserve_attrs bulk into ↵Chris McDonough
preserve_view_attrs, make sure decorator preserves view attrs
2010-12-29simplify guard logic for __action_decorator__Chris McDonough
2010-12-29adjust tests to work w/ latest merge and changesRob Miller
2010-12-29Merge remote branch 'refs/remotes/upstream/viewderiver' into ra_view_decorationRob Miller
Conflicts: CHANGES.txt pyramid/config.py
2010-12-29factor deriver from mapperChris McDonough
2010-12-28Enforce that _action_decorator must be a classmethodRob Miller
2010-12-28change ``MyView`` to ``MyHandler``, since it's a handler we're mockingRob Miller
2010-12-28Added support for an _action_decorator classmethod on handler classes.Rob Miller
2010-12-28add decorator argument to add_view method to support auto-wrapping view ↵Rob Miller
callables with a decorator at view registration time
2010-12-28Merge branch 'master' into viewderiverChris McDonough
2010-12-28- The ``proutes`` command tried too hard to resolve the view for printing,Chris McDonough
resulting in exceptions when an exceptional root factory was encountered. Instead of trying to resolve the view, if it cannot, it will now just print ``<unknown>``.
2010-12-27- Add ``paster proute`` command which displays a summary of the routingChris McDonough
table. See the narrative documentation section within the "URL Dispatch" chapter entitled "Displaying All Application Routes". - Added narrative documentation section within the "URL Dispatch" chapter entitled "Displaying All Application Routes" (for ``paster proutes`` command).
2010-12-25- Prevent misunderstanding of how the ``view`` and ``view_permission``Chris McDonough
arguments to add_route work by raising an exception during configuration if view-related arguments exist but no ``view`` argument is passed.
2010-12-24fix permission discussionChris McDonough
2010-12-24- Fix API documentation rendering for ``pyramid.view.static``Chris McDonough
2010-12-23share shell globals between interact and IPShellChris McDonough
2010-12-23use WebOb docstring rather than copying itChris McDonough
2010-12-23- The name ``registry`` was not available in the ``paster pshell``Chris McDonough
environment under IPython.
2010-12-23correct missed bfg->pyramidChris McDonough
2010-12-23clarifyChris McDonough
2010-12-22Changed my mind. Never pop the CSRF token. Leave it around untilChris McDonough
a new one replaces it.
2010-12-22- The ``pyramid_zodb`` Paster template no longer employs ZCML. Instead, itChris McDonough
is based on scanning. - Changed the "ZODB + Traversal Wiki Tutorial" based on changes to ``pyramid_zodb`` Paster template.
2010-12-22- Added CSRF token generation, as described in the narrative chapter entitledChris McDonough
"Preventing Cross-Site Request Forgery Attacks".
2010-12-22change flash API as per email convo with Ben and MikeChris McDonough
2010-12-22factor all view wrapper funcs into a ViewDeriver classChris McDonough
2010-12-22- Added flash messaging, as described in the "Flash Messaging" narrativeChris McDonough
documentation chapter.
2010-12-21- Added "Finding the Root Resource" to Resources narrative chapter.Chris McDonough
- Added "Finding a Resource With a Class or Interface in Lineage" to Resources narrative chapter.
2010-12-20- Added "Obtaining the Lineage of a Resource" to the Resources narrativeChris McDonough
chapter. - Added "Determining if a Resource is In The Lineage of Another Resource" to Resources narrative chapter.
2010-12-20FeaturesChris McDonough
-------- - If a resource implements a ``__resource_url__`` method, it will be called as the result of invoking the ``pyramid.url.resource_url`` function to generate a URL, overriding the default logic. See the new "Generating The URL Of A Resource" section within the Resources narrative chapter. Documentation ------------- - Added "Generating The URL Of A Resource" section to the Resources narrative chapter (includes information about overriding URL generation using ``__resource_url__``). - Added "Generating the Path To a Resource" section to the Resources narrative chapter. - Added "Finding a Resource by Path" section to the Resources narrative chapter.
2010-12-19add functional testing exampleChris McDonough