summaryrefslogtreecommitdiff
path: root/docs/narr/hooks.rst
AgeCommit message (Collapse)Author
2011-08-14- The ``route_url``, ``route_path``, ``resource_url``, ``static_url``, andChris McDonough
``current_route_url`` functions in the ``pyramid.url`` package now delegate to a method on the request they've been passed, instead of the other way around. The pyramid.request.Request object now inherits from a mixin named pyramid.url.URLMethodsMixin to make this possible, and all url/path generation logic is embedded in this mixin. - Narrative and API documentation which used the ``route_url``, ``route_path``, ``resource_url``, ``static_url``, and ``current_route_url`` functions in the ``pyramid.url`` package have now been changed to use eponymous methods of the request instead.
2011-08-13Require that tween_factory argument to add_tween be a dotted name.Chris McDonough
2011-08-13disallow adding a tween factory which is an instance without passing its ↵Chris McDonough
globally importable name
2011-08-12Merge branch 'fix.tween-graph'Michael Merickel
2011-08-12Updated the docs with the new over/under tuples.Michael Merickel
2011-08-12garden changes; fix docs renderingChris McDonough
2011-08-12add pyramid.tweens configuration value docsChris McDonough
2011-08-10trunk is 1.2dev, who are we foolingChris McDonough
2011-08-08document under and over paramsChris McDonough
2011-08-06docs renderingChris McDonough
2011-08-06change return value of tween to just responseChris McDonough
2011-08-06add tweens module, add docs for ptweens and tweens to hooksChris McDonough
2011-07-30Updated all of the docs to reflect the new pyramid.* settings prefix.Michael Merickel
2011-07-28add some edits to the docs for response_adapter decorator; fix renderingsChris McDonough
2011-07-28mergeChris McDonough
2011-07-22Fixed formatting fail.Michael Merickel
2011-07-20add more index markersChris McDonough
2011-07-12reviewedChris McDonough
2011-07-11Decorator version of config.add_response_adapter.Manuel Hermann
2011-07-02reorderChris McDonough
2011-07-01- Deprecated the ``set_renderer_globals_factory`` method of the ConfiguratorChris McDonough
and the ``renderer_globals`` Configurator constructor parameter.
2011-06-20- Register the default exception view for context ofChris McDonough
webob.exc.WSGIHTTPException (convenience). - Use ``exc.message`` in docs rather than ``exc.args[0]`` now that we control this.
2011-06-18fix renderingChris McDonough
2011-06-14merge httpexception-utils branchChris McDonough
2011-06-14- Added new add_response_adapter method to Configurator.Chris McDonough
- Fix Configurator docstring wrt exception responses. - Speed up registry.queryAdapterOrSelf
2011-06-13- Remove IResponder abstraction in favor of more general IResponseChris McDonough
abstraction. - It is now possible to return an arbitrary object from a Pyramid view callable even if a renderer is not used, as long as a suitable adapter to ``pyramid.interfaces.IResponse`` is registered for the type of the returned object. See the section in the Hooks chapter of the documentation entitled "Changing How Pyramid Treats View Responses". - The Pyramid router now, by default, expects response objects returned from view callables to implement the ``pyramid.interfaces.IResponse`` interface. Unlike the Pyramid 1.0 version of this interface, objects which implement IResponse now must define a ``__call__`` method that accepts ``environ`` and ``start_response``, and which returns an ``app_iter`` iterable, among other things. Previously, it was possible to return any object which had the three WebOb ``app_iter``, ``headerlist``, and ``status`` attributes as a response, so this is a backwards incompatibility. It is possible to get backwards compatibility back by registering an adapter to IResponse from the type of object you're now returning from view callables. See the section in the Hooks chapter of the documentation entitled "Changing How Pyramid Treats View Responses". - The ``pyramid.interfaces.IResponse`` interface is now much more extensive. Previously it defined only ``app_iter``, ``status`` and ``headerlist``; now it is basically intended to directly mirror the ``webob.Response`` API, which has many methods and attributes. - Documentation changes to support above.
2011-06-11- Pyramid now expects Response objects to have a __call__Chris McDonough
method which implements the WSGI application interface instead of the three webob attrs status, headerlist and app_iter. Backwards compatibility exists for code which returns response objects that do not have a __call__. - pyramid.response.Response is no longer an exception (and therefore cannot be raised in order to generate a response). - Changed my mind about moving stuff from pyramid.httpexceptions to pyramid.response. The stuff I moved over has been moved back to pyramid.httpexceptions.
2011-06-05More small fixes made reading the rest of the docs and the tutorials.Christoph Zwerschke
2011-06-04- It is now possible to control how the Pyramid router calls the WSGIChris McDonough
``start_response`` callable and obtains the WSGI ``app_iter`` based on adapting the response object to the new ``pyramid.interfaces.IResponder`` interface. The default ``IResponder`` uses Pyramid 1.0's logic to do this. To override the responder:: from pyramid.interfaces import IResponder from pyramid.response import Response from myapp import MyResponder config.registry.registerAdapter(MyResponder, (Response,), IResponder, name='') This makes it possible to reuse response object implementations which have, for example, their own ``__call__`` expected to be used as a WSGI application (like ``pyramid.response.Response``), e.g.: class MyResponder(object): def __init__(self, response): """ Obtain a reference to the response """ self.response = response def __call__(self, request, start_response): """ Call start_response and return an app_iter """ app_iter = self.response(request.environ, start_response) return app_iter
2011-05-31the canonical import location for HTTP exceptions/responses is now ↵Chris McDonough
pyramid.response
2011-04-13- Add missing docs reference toChris McDonough
``pyramid.config.Configurator.set_view_mapper`` and refer to it within Hooks chapter section named "Using a View Mapper".
2011-03-24Merge remote branch 'source/master'Alexandre Bourget
Conflicts: docs/narr/hooks.rst
2011-03-24Fix some typos.Alexandre Bourget
2011-01-27module name contractionsChris McDonough
2011-01-19- When a ``pyramid.exceptions.Forbidden`` error is raised, its status codeChris McDonough
now ``403 Forbidden``. It was previously ``401 Unauthorized``, for backwards compatibility purposes with ``repoze.bfg``. This change will cause problems for users of Pyramid with ``repoze.who``, which intercepts ``401 Unauthorized`` by default, but allows ``403 Forbidden`` to pass through. Those deployments will need to configure ``repoze.who`` to also react to ``403 Forbidden``.
2011-01-18Merge https://github.com/Pylons/pyramidCasey Duncan
2011-01-18add word chapterCasey Duncan
2011-01-18fix spacingCasey Duncan
2011-01-18- Most references to ZCML in narrative chapters have been removed orChris McDonough
redirected to ``pyramid_zcml`` locations.
2011-01-16- The ``pylons_minimal``, ``pylons_basic`` and ``pylons_sqla`` pasterChris McDonough
templates were removed. Use ``pyramid_sqla`` (available from PyPI) as a generic replacement for Pylons-esque development. - All references to ``add_handler`` and the ``handler`` ZCML directive have been removed from the docs, and stubs which point to ``pylons_handlers`` package have replaced them.
2011-01-09add reference targetChris McDonough
2011-01-07- Document ``Configurator.set_view_mapper``.Chris McDonough
- Document ``__view_mapper__`` attribute and ``mapper`` argument to view configuration for view callable view mapper preference.
2011-01-06get rid of incorrect usage of threadlocals during configuration in venusian ↵Chris McDonough
example
2010-12-27remove inappropriate use of begin/endChris McDonough
2010-12-26reorder chapterChris McDonough
2010-12-26- Move ZCML usage in Hooks chapter to Declarative Configuration chapter.Chris McDonough
2010-12-18model -> resource; resource -> assetChris McDonough
2010-12-09fix docs: pyramid.configuration -> pyramid.configChris McDonough
2010-11-28Narrative doc cleanupBlaise Laflamme
2010-11-11fix issue 32: use renderer rather than zpt render_template_to_responseChris McDonough