summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-06-11todoChris McDonough
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-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-31broke this in the last commitChris McDonough
2011-05-31the canonical import location for HTTP exceptions/responses is now ↵Chris McDonough
pyramid.response
2011-05-30- Fix older CHANGES entries.Chris McDonough
- The ``pyramid.request.Request`` class now has a ``ResponseClass`` interface which points at ``pyramid.response.Response``. - The ``pyramid.request.Response`` class now has a ``RequestClass`` interface which points at ``pyramid.response.Request``. - ``pyramid.response.Response`` is now a *subclass* of ``webob.response.Response``. It also inherits from the built-in Python ``Exception`` class and implements the ``pyramid.interfaces.IExceptionResponse`` class so it can be raised as an exception from view code.
2011-05-29docs fixesChris McDonough
2011-05-29docs fixesChris McDonough
2011-05-29remove unused commentsChris McDonough
2011-05-29back up to complete coverageChris McDonough
2011-05-29add some tests for WSGIHTTPExceptionChris McDonough
2011-05-29change docs; simplifyChris McDonough
2011-05-29preemptively drop 2.4 supportChris McDonough
2011-05-28move is_response back to pyramid.viewChris McDonough
2011-05-28explain betterChris McDonough
2011-05-28explain betterChris McDonough
2011-05-28use a generator; explainChris McDonough
2011-05-28bite the bullet and replace all webob.exc classes with ones of our ownChris McDonough
2011-05-28horrid workaround for no app_iter initializedChris McDonough
2011-05-26work towards unifying NotFound/HTTPNotFound and Forbidden/HTTPForbidden; 2 ↵Chris McDonough
tests fail
2011-05-16typoChris McDonough
2011-05-16- Added API docs for ``pyramid.httpexceptions.abort`` andChris McDonough
``pyramid.httpexceptions.redirect``. - Added "HTTP Exceptions" section to Views narrative chapter including a description of ``pyramid.httpexceptions.abort``; adjusted redirect section to note ``pyramid.httpexceptions.redirect``. - A default exception view for the context ``webob.exc.HTTPException`` (aka ``pyramid.httpexceptions.HTTPException``) is now registered by default. This means that an instance of any exception class imported from ``pyramid.httpexceptions`` (such as ``HTTPFound``) can now be raised from within view code; when raised, this exception view will render the exception to a response. - New functions named ``pyramid.httpexceptions.abort`` and ``pyramid.httpexceptions.redirect`` perform the equivalent of their Pylons brethren when an HTTP exception handler is registered. These functions take advantage of the newly registered exception view for ``webob.exc.HTTPException``. - The Configurator now accepts an additional keyword argument named ``httpexception_view``. By default, this argument is populated with a default exception view function that will be used when an HTTP exception is raised. When ``None`` is passed for this value, an exception view for HTTP exceptions will not be registered. Passing ``None`` returns the behavior of raising an HTTP exception to that of Pyramid 1.0 (the exception will propagate to middleware and to the WSGI server).
2011-05-15gardenChris McDonough
2011-05-15docstring/comment changesChris McDonough
2011-05-14template -> scaffoldChris McDonough
2011-05-14Merge branch 'master' of github.com:Pylons/pyramidChris McDonough
2011-05-14add 'What's new In Pyramid 1.1' documentChris McDonough
2011-05-14Merge pull request #190 from wichert/masterCarlos de la Guardia
Correct a typo in my surname
2011-05-14Correct spelling of my nameWichert Akkerman
2011-05-14applied some of the suggestions from issue #189. closes #189Chris McDonough
2011-05-14gardenChris McDonough
2011-05-14use lingua in docs (thanks to wichert)Chris McDonough
2011-05-13good enoughChris McDonough
2011-05-13fix IRouteMapper interface to match realityChris McDonough
2011-05-13- The ``add_route`` method of the Configurator now accepts a ``static``Chris McDonough
argument. If this argument is ``True``, the added route will never be considered for matching when a request is handled. Instead, it will only be useful for URL generation via ``route_url`` and ``route_path``. See the section entitled "Static Routes" in the URL Dispatch narrative chapter for more information.
2011-05-13- Added documentation for a "multidict" (e.g. the API of ``request.POST``) asChris McDonough
interface API documentation.
2011-05-13note location changeChris McDonough
2011-05-12rename 'paster_templates' to 'scaffolds', adjust referencesChris McDonough
2011-05-12zcml not part of pyramid itself anymoreChris McDonough
2011-05-12gardenChris McDonough
2011-05-12Merge branch 'master' of github.com:Pylons/pyramidChris McDonough
2011-05-11Silence stupid deprecation under Python >= 2.7.Tres Seaver
2011-05-10Merge branch 'master' of github.com:Pylons/pyramidChris McDonough
2011-05-10Merge pull request #187 from aodag/masterTres Seaver
Instances if DefaultViewMapper provide IViewMapper. The class itself provides IViewMapperFactory.
2011-05-09Merge pull request #188 from dairiki/masterCarlos de la Guardia
Trivial doc typos...
2011-05-09fixes trivial doc typosGeoffrey T. Dairiki
2011-05-09wrong declaring for provided and implemented interface of DefaultViewMapper.Atsushi Odagiri
2011-05-05added note about constructor argument for same purpose, for uniformitycguardia
2011-05-05removed meth indicator, which caused parentheses to show beside the name of ↵cguardia
the argument
2011-05-05removed meth indicator, which was showing on the rendered docscguardia