summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-09-05- Each of the follow methods of the Configurator now allow theChris McDonough
below-named arguments to be passed as "dotted name strings" (e.g. "foo.bar.baz") rather than as actual implementation objects that must be imported: setup_registry root_factory, authentication_policy, authorization_policy, debug_logger, locale_negotiator, request_factory, renderer_globals_factory add_subscriber subscriber, iface derive_view view add_view view, for_, context, request_type, containment add_route() view, view_for, factory, for_, view_context scan package add_renderer factory set_forbidden_view view set_notfound_view view set_request_factory factory set_renderer_globals_factory() factory set_locale_negotiator negotiator testing_add_subscriber event_iface
2010-09-05gardeningChris McDonough
2010-09-05fixChris McDonough
2010-09-05fixChris McDonough
2010-09-05fixChris McDonough
2010-09-05update latex indexChris McDonough
2010-09-05DocumentationChris McDonough
------------- - Add an API chapter for the ``repoze.bfg.request`` module, which includes documentation for the ``repoze.bfg.request.Request`` class (the "request object"). - Modify the "Request and Response" narrative chapter to reference the new ``repoze.bfg.request`` API chapter. Some content was moved from this chapter into the API documentation itself. Features -------- - A new ``repoze.bfg.request.Request.add_response_callback`` API has been added. This method is documented in the new ``repoze.bfg.request`` API chapter. It can be used to influence response values before a concrete response object has been created. Internal -------- - The (internal) feature which made it possible to attach a ``global_response_headers`` attribute to the request (which was assumed to contain a sequence of header key/value pairs which would later be added to the response by the router), has been removed. The functionality of ``repoze.bfg.request.Request.add_response_callback`` takes its place.
2010-08-31- The reify decorator now maintains the docstring of the function itChris McDonough
wraps.
2010-08-31docstringChris McDonough
2010-08-30- The ZCML ``include`` directive docs were incorrect: they specifiedChris McDonough
``filename`` rather than (the correct) ``file`` as an allowable attribute.
2010-08-29Fix ReST errorWichert Akkerman
2010-08-29Remove double entryWichert Akkerman
2010-08-26todo gardeningChris McDonough
2010-08-26todo gardening.Chris McDonough
2010-08-26avoid some getattrsChris McDonough
2010-08-26the goggles, they can be replacedChris McDonough
2010-08-24todo gardeningChris McDonough
2010-08-24todo gardeningChris McDonough
2010-08-24todo gardeningChris McDonough
2010-08-23prep for 1.3a9Chris McDonough
2010-08-23docs renderingsChris McDonough
2010-08-23fix docs for render* functionsChris McDonough
2010-08-23docs renderingsChris McDonough
2010-08-13svn merge -r9909:HEAD $REPOZE_SVN/repoze.bfg/branches/rendererhelperChris McDonough
2010-08-13- The newChris McDonough
:meth"`repoze.bfg.configuration.Configurator.absolute_resource_spec` method resolves a potentially relative :term:`resource specification` string into an absolute version.
2010-08-13typoChris McDonough
2010-08-13- The Configurator now accepts a dotted name *string* to a package asChris McDonough
a ``package`` constructor argument. The ``package`` argument was previously required to be a package *object* (not a dotted name string). - The ``repoze.bfg.configuration.Configurator.with_package`` method was added. This method returns a new Configurator using the same application registry as the configurator object it is called upon. The new configurator is created afresh with its ``package`` constructor argument set to the value passed to ``with_package``. This feature will make it easier for future BFG versions to allow dotted names as arguments in places where currently only object references are allowed (the work to allow dotted names isntead of object references everywhere has not yet been done, however). - The ``repoze.bfg.configuration.Configurator.maybe_dotted`` method resolves a Python dotted name string supplied as its ``dotted`` argument to a global Python object. If the value cannot be resolved, a ``repoze.bfg.configuration.ConfigurationError`` is raised. If the value supplied as ``dotted`` is not a string, the value is returned unconditionally without any resolution attempted.
2010-08-13todo gardeningChris McDonough
2010-08-10entryChris McDonough
2010-08-10changelog entryChris McDonough
2010-08-10use imp.get_suffixes indirection for package file namesChris McDonough
2010-08-10minimally make tests run under jythonChris McDonough
2010-08-09renderingChris McDonough
2010-08-09fix in case dotted is tupleChris McDonough
2010-08-09forward compat test fixes for when we package can be stringChris McDonough
2010-08-09todo gardeningChris McDonough
2010-08-09renderingChris McDonough
2010-08-09prep for 1.3a8Chris McDonough
2010-08-08renderingChris McDonough
2010-08-08Fixed reST typo that caused most part of the warning block not to be rendered.Damien Baty
2010-08-08- New public interface: ``repoze.bfg.exceptions.IExceptionResponse``.Chris McDonough
This interface is provided by all internal exception classes (such as ``repoze.bfg.exceptions.NotFound`` and ``repoze.bfg.exceptions.Forbidden``), instances of which are both exception objects and can behave as WSGI response objects. This interface is made public so that exception classes which are also valid WSGI response factories can be configured to implement them or exception instances which are also or response instances can be configured to provide them. - New API class: ``repoze.bfg.view.AppendSlashNotFoundViewFactory`` (undoes previous custom_notfound_view on request passsed to append_slash_notfound_view). - Previously, two default view functions were registered at Configurator setup (one for ``repoze.bfg.exceptions.NotFound`` named ``default_notfound_view`` and one for ``repoze.bfg.exceptions.Forbidden`` named ``default_forbidden_view``) to render internal exception responses. Those default view functions have been removed, replaced with a generic default view function which is registered at Configurator setup for the ``repoze.bfg.interfaces.IExceptionResponse`` interface that simply returns the exception instance; the ``NotFound` and ``Forbidden`` classes are now still exception factories but they are also response factories which generate instances that implement the new ``repoze.bfg.interfaces.IExceptionResponse`` interface.
2010-08-07fix whatsnewChris McDonough
2010-08-07FeaturesChris McDonough
-------- - There can only be one Not Found view in any ``repoze.bfg`` application. If you use ``repoze.bfg.view.append_slash_notfound_view`` as the Not Found view, it still must generate a NotFound response when it cannot redirect to a slash-appended URL; this not found response will be visible to site users. As of this release, if you wish to use a custom notfound view callable when ``append_slash_notfound_view`` does not redirect to a slash-appended URL, use a wrapper function as the ``repoze.bfg.exceptions.NotFound`` view; have this wrapper attach a view callable which returns a response to the request object named ``custom_notfound_view`` before calling ``append_slash_notfound_view``. For example:: from webob.exc import HTTPNotFound from repoze.bfg.exceptions import NotFound from repoze.bfg.view import append_slash_notfound_view def notfound_view(exc, request): def fallback_notfound_view(exc, request): return HTTPNotFound('It aint there, stop trying!') request.fallback_notfound_view = fallback_notfound_view return append_slash_notfound_view(exc, request) config.add_view(notfound_view, context=NotFound) ``custom_notfound_view`` must adhere to the two-argument view callable calling convention of ``(context, request)`` (``context`` will be the exception object). If ``custom_notfound_view`` is not found on the request object, a default notfound response will be generated when the ``append_slash_notfound_view`` doesn't redirect to a slash-appended URL. Documentation -------------- - Expanded the "Cleaning Up After a Request" section of the URL Dispatch narrative chapter. - Expanded the "Redirecting to Slash-Appended Routes" section of the URL Dispatch narrative chapter.
2010-08-07runChris McDonough
2010-08-07wordingChris McDonough
2010-08-06renderingChris McDonough
2010-08-06Describe what a microframework is.Chris McDonough
2010-08-06headerChris McDonough
2010-08-06Microframework defense.Chris McDonough
2010-08-02add infrastructure for resolving dotted namesChris McDonough