summaryrefslogtreecommitdiff
path: root/docs/narr/router.rst
AgeCommit message (Collapse)Author
2016-04-11- upgrade `BeforeTraversal` event in router.rstSteve Piercy
2016-04-10Update router documentationBert JW Regeer
2015-10-09wrap 79 colsSteve Piercy
(cherry picked from commit 703b958)
2015-10-06- neutral gender, grammar, rewrappingSteve Piercy
2014-12-26- adding back .png file because PDF cannot include and build SVG files. Also ↵Steve Piercy
renamed images to use a 'imagename.*' wildcard so that the correct format is chosen. See http://stackoverflow.com/questions/6473660/using-sphinx-docs-how-can-i-specify-png-image-formats-for-html-builds-and-pdf-im
2014-12-01replace router.png with pyramid_router.svg and make design consistentSteve Piercy
2014-12-01- rename pyramid_router.svg to pyramid_request_processing.svg to be ↵Steve Piercy
consistent with its content - add source files for future modifications
2014-11-22add request processing diagram to docs/narr/router.rstSteve Piercy
2013-03-05grammar fixesTshepang Lekhonkhobe
2011-12-10update router documentChris McDonough
2011-07-20add more index markersChris McDonough
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-05-31the canonical import location for HTTP exceptions/responses is now ↵Chris McDonough
pyramid.response
2011-01-27module name contractionsChris McDonough
2011-01-18fix typooCasey Duncan
2010-12-31Remove resource location chapter and move intro parts to url dispatch. The ↵Casey Duncan
new much ado about traversal chapter takes care of selling traversal now
2010-12-19contextfinding -> resourcelocationJamaludin Ahmad
2010-11-09- All references to Pyramid-the-application were changed from :mod:`pyramid`Chris McDonough
to :app:`Pyramid`. A custom role setting was added to ``docs/conf.py`` to allow for this. (internal)
2010-11-07- All references to events by interfaceChris McDonough
(e.g. ``pyramid.interfaces.INewRequest``) have been changed to reference their concrete classes (e.g. ``pyramid.events.NewRequest``) in documentation about making subscriptions.
2010-10-25convert narrative docs to PyramidChris McDonough
2010-09-13glossary nameChris McDonough
2010-09-13FeaturesChris McDonough
-------- - A ``request.matched_route`` attribute is now added to the request when a route has matched. Its value is the "route" object that matched (see the ``IRoute`` interface within ``repoze.bfg.interfaces`` API documentation for the API of a route object). - The ``exception`` attribute of the request is now set slightly earlier and in a slightly different set of scenarios, for benefit of "finished callbacks" and "response callbacks". In previous versions, the ``exception`` attribute of the request was not set at all if an exception view was not found. In this version, the ``request.exception`` attribute is set immediately when an exception is caught by the router, even if an exception view could not be found. Backwards Incompatibilities --------------------------- - The router no longer sets the value ``wsgiorg.routing_args`` into the environ when a route matches. The value used to be something like ``((), matchdict)``. This functionality was only ever obliquely referred to in change logs; it was never documented as an API. - The ``exception`` attribute of the request now defaults to ``None``. In prior versions, the ``request.exception`` attribute did not exist if an exception was not raised by user code during request processing; it only began existence once an exception view was found. Deprecations ------------ - References to the WSGI environment values ``bfg.routes.matchdict`` and ``bfg.routes.route`` were removed from documentation. These will stick around internally for several more releases, but it is ``request.matchdict`` and ``request.matched_route`` are now the "official" way to obtain the matchdict and the route object which resulted in the match. Documentation ------------- - Added two sections to the "Hooks" chapter of the documentation: "Using Response Callbacks" and "Using Finished Callbacks". - Added documentation of the ``request.exception`` attribute to the ``repoze.bfg.request.Request`` API documentation. - Added glossary entries for "response callback" and "finished callback". - The "Request Processing" narrative chapter has been updated to note finished and response callback steps.
2010-09-12- The BFG router now emits an additional event unconditionally at theChris McDonough
end of request processing: ``repoze.bfg.interfaces.IFinishedRequest``. This event is meant to be used when it is necessary to perform unconditional cleanup after request processing. See the ``repoze.bfg.events.FinishedRequest`` class documentation for more information. - The ``repoze.bfg.interfaces.IWSGIApplicationCreatedEvent`` event interface was renamed to ``repoze.bfg.interfaces.IApplicationCreated``. Likewise, the ``repoze.bfg.events.WSGIApplicationCreatedEvent`` class was renamed to ``repoze.bfg.events.ApplicationCreated``. The older aliases will continue to work indefinitely. - The ``repoze.bfg.interfaces.IAfterTraversal`` event interface was renamed to ``repoze.bfg.interfaces.IContextFound``. Likewise, the ``repoze.bfg.events.AfterTraveral`` class was renamed to ``repoze.bfg.events.ContextFound``. The older aliases will continue to work indefinitely.
2010-09-08- The ``repoze.bfg.urldispatch.Route`` constructor (not an API) nowChris McDonough
accepts a different ordering of arguments. Previously it was ``(pattern, name, factory=None, predicates=())``. It is now ``(name, pattern, factory=None, predicates=())``. This is in support of consistency with ``configurator.add_route``. - The ``repoze.bfg.urldispatch.RoutesMapper.connect`` method (not an API) now accepts a different ordering of arguments. Previously it was ``(pattern, name, factory=None, predicates=())``. It is now ``(name, pattern, factory=None, predicates=())``. This is in support of consistency with ``configurator.add_route``. - The ``repoze.bfg.urldispatch.RoutesMapper`` object now has a ``get_route`` method which returns a single Route object or ``None``. - A new interface ``repoze.bfg.interfaces.IRoute`` was added. The ``repoze.bfg.urldispatch.Route`` object implements this interface. - The canonical attribute for accessing the routing pattern from a route object is now ``pattern`` rather than ``path``. - The argument to ``repoze.bfg.configuration.Configurator.add_route`` which was previously called ``path`` is now called ``pattern`` for better explicability. For backwards compatibility purposes, passing a keyword argument named ``path`` to ``add_route`` will still work indefinitely. - The ``path`` attribute to the ZCML ``route`` directive is now named ``pattern`` for better explicability. The older ``path`` attribute will continue to work indefinitely. - All narrative, API, and tutorial docs which referred to a route pattern as a ``path`` have now been updated to refer to them as a ``pattern``. - The routesalchemy template has been updated to use ``pattern`` in its route declarations rather than ``path``.
2010-03-28quick fixCarlos de la Guardia
2010-01-18Prep for b1Chris McDonough
Merge a bunch of paper-based docs fixes Configure logging during bfgshell.
2010-01-17More pass overhaul based on making contextfinding explicit within documentation.Chris McDonough
2010-01-16Massive overhaul to deal with the reality that we don't map URLs directly to ↵Chris McDonough
code.
2010-01-11Merge of andrew-docs branch.Chris McDonough
2009-12-27- Added manual index entries to generated index.Chris McDonough
2009-12-27Latex rendering.Chris McDonough
Documentation licensing.
2009-12-23(no commit message)Chris McDonough
2009-12-09Excise make_app from docs.Chris McDonough
2009-10-30- The ``__call__`` of a plugin "traverser" implementation (registeredChris McDonough
as an adapter for ``ITraverser`` or ``ITraverserFactory``) will now receive a *request* as the single argument to its ``__call__`` method. In previous versions it was passed a WSGI ``environ`` object. The request object passed to the factory implements dictionary-like methods in such a way that existing traverser code which expects to be passed an environ will continue to work. - Fix docs.
2009-09-30- Add a diagram which explains the operation of the BFG router to theChris McDonough
"Router" narrative chapter.
2009-07-05Spellcheck.Chris McDonough
2009-06-24- ``repoze.bfg`` no longer relies on the Routes package to interpretChris McDonough
URL paths.
2009-06-19- Added a (fairly sad) "Combining Traversal and URL Dispatch" chapterChris McDonough
to the narrative documentation.
2009-06-19Add a router chapter.Chris McDonough