| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Docs code style
|
|
|
|
|
|
"functions, classes or any callable that accept" was messing with the flow while reading. Proposed change flows a little better for me.
(cherry picked from commit 87d8aba)
|
|
distinguish between Pyramid itself and view code raising the exception as in previous exception listing.
(cherry picked from commit eb166fb)
|
|
minor change to flow better
(cherry picked from commit 0c705c9)
|
|
- Closes #2768
|
|
- previously the multiview was shared for both exception and hot-route,
but now that we allow some exception-only views this needed to be
separated
- add ViewDeriverInfo.exception_only to detect exception views
- do not prevent http_cache on exception views
- optimize secured_view and csrf_view derivers to remove themselves from
the view pipeline for exception views
|
|
|
|
with the same indentation as the rest of the code block)
|
|
|
|
miscellaneous doc improvements
|
|
|
|
|
|
|
|
|
|
|
|
fix grammar, and remove repetition
|
|
Also fixes grammar, and removes repetition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conflicts:
docs/narr/views.rst
|
|
|
|
|
|
|
|
Correcting a noun; 'a' => 'an', since __call__ starts with a consonant.
|
|
|
|
- Added more indexing markers to sections in documentation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
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.
|
|
pyramid.response
|
|
|
|
``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).
|
|
|
|
|
|
|
|
|
|
better place to put it.
|