| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(usually set up by Paste as part of startup). This means that output from
e.g. ``debug_notfound``, ``debug_authorization``, etc. will go to the
normal logging channels. The logger name of the debug logger will be the
package name of the *caller* of the Configurator's constructor.
- If a string is passed as the ``debug_logger`` parameter to a Configurator,
that string is considered to be the name of a global Python logger rather
than a dotted name to an instance of a logger.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
used to wrap the found view callable before it is called by Pyramid's
router. This is a feature usually only used by framework extensions, to
provide, for example, view timing support.
A view wrapper factory must be a callable which accepts three arguments:
``view_callable``, ``request``, and ``exc``. It must return a view
callable. The view callable returned by the factory must implement the
``context, request`` view callable calling convention. For example::
import time
def wrapper_factory(view_callable, request, exc):
def wrapper(context, request):
start = time.time()
result = view_callable(context, request)
end = time.time()
request.view_timing = end - start
return result
return wrapper
The ``view_callable`` argument to the factory will be the view callable
found by Pyramid via view lookup. The ``request`` argument to the factory
will be the current request. The ``exc`` argument to the factory will be
an Exception object if the found view is an exception view; it will be
``None`` otherwise.
View wrappers only last for the duration of a single request. You can add
such a factory for every request by using the
``pyramid.events.NewRequest`` subscriber::
from pyramid.events import subscriber, NewRequest
@subscriber(NewRequest)
def newrequest(event):
event.request.add_view_wrapper(wrapper_factory)
If more than one view wrapper is registered during a single request,
a 'later' view wrapper factory will be called with the result of its
directly former view wrapper factory as its ``view_callable``
argument; this chain will be returned to Pyramid as a single view
callable.
|
|
|
|
|
|
|
|
``rendering_val``. This can be used to introspect the value returned by a
view in a BeforeRender subscriber.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Please accept my signature of the contributor's agreement.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use ``/projects/pyramid/current`` rather than ``/projects/pyramid/dev``.
|
|
|
|
renderer is an object that can be used in advanced integration cases as
input to the view configuration ``renderer=`` argument. When the null
renderer is used as a view renderer argument, Pyramid avoids converting the
view callable result into a Response object. This is useful if you want to
reuse the view configuration and lookup machinery outside the context of
its use by the Pyramid router. This feature was added for consumption by
the ``pyramid_rpc`` package, which uses view configuration and lookup
outside the context of a router in exactly this way. ``pyramid_rpc`` has
been broken under 1.1 since 1.1b1; adding it allows us to make it work
again.
|
|
``pyramid.renderers.renderer_from_name`` which has seen use in the wild.
- Add a ``clone`` method to ``pyramid.renderers.RendererHelper`` for use by
the ``pyramid.view.view_config`` decorator.
|
|
|
|
|
|
compatibility with Python 2.4.
|
|
|
|
|
|
|