notfound ZCML directive is deprecated in Pyramid
version 1.0. Instead, you should use the :ref:`view_directive`
directive with a
context that names the
:exc:`pyramid.exceptions.NotFound` class. See
:ref:`changing_the_notfound_view` form more information.
When Pyramid can't map a URL to view code, it invokes a :term:`not found
view`. The default not found view is very plain, but the view callable used
can be configured via the
notfound ZCML tag.
- The :term:`dotted Python name` to a :term:`view callable`. This
attribute is required unless a
rendererattribute also exists. If a
rendererattribute exists on the directive, this attribute defaults to a view that returns an empty dictionary (see :ref:`views_which_use_a_renderer`).
- The attribute of the view callable to use if
__call__is not correct (has the same meaning as in the context of :ref:`view_directive`; see the description of
- This is either a single string term (e.g.
json) or a string implying a path or :term:`asset specification` (e.g.
templates/views.pt) used when the view returns a non-:term:`response` object. This attribute has the same meaning as it would in the context of :ref:`view_directive`; see the description of
- The :term:`view name` (not an object dotted name) of another view
declared elsewhere in ZCML (or via the
@view_configdecorator) which will receive the response body of this view as the
request.wrapped_bodyattribute of its own request, and the response returned by this view as the
request.wrapped_responseattribute of its own request. This attribute has the same meaning as it would in the context of :ref:`view_directive`; see the description of
wrapperthere). Note that the wrapper view should not be protected by any permission; behavior is undefined if it does.
See also :ref:`changing_the_notfound_view`.