If secure` is True, and the view callable found is
protected by a permission, the permission will be checked before calling
the view function. If the permission check disallows view execution
(based on the current authorization policy), a
pyramid.httpexceptions.HTTPForbidden exception will be raised.
The exception's args attribute explains why the view access was
disallowed.

Call the view callable configured with a view
configuration that matches the view namename
registered against the specified context and request and
return an iterable object which represents the body of a response.
This function will return None if a corresponding view
callable cannot be found (when no view configuration
matches the combination of name / context / and
request). Additionally, this function will raise a
ValueError if a view function is found and called but the
view function's result does not have an app_iter attribute.

You can usually get the bytestring representation of the return value of
this function by calling b''.join(iterable), or just use
pyramid.view.render_view() instead.

If secure is True, and the view is protected by a permission, the
permission will be checked before the view function is invoked. If the
permission check disallows view execution (based on the current
authentication policy), a
pyramid.httpexceptions.HTTPForbidden exception will be raised; its
args attribute explains why the view access was disallowed.

Call the view callable configured with a view
configuration that matches the view namename
registered against the specified context and request
and unwind the view response's app_iter (see
View Callable Responses) into a single bytestring. This function will
return None if a corresponding view callable cannot be
found (when no view configuration matches the combination
of name / context / and request). Additionally, this
function will raise a ValueError if a view function is
found and called but the view function's result does not have an
app_iter attribute. This function will return None if a
corresponding view cannot be found.

If secure is True, and the view is protected by a permission, the
permission will be checked before the view is invoked. If the permission
check disallows view execution (based on the current authorization
policy), a pyramid.httpexceptions.HTTPForbidden exception will be
raised; its args attribute explains why the view access was
disallowed.

The meanings of these arguments are the same as the arguments passed to
pyramid.config.Configurator.add_view(). If any argument is left
out, its default will be the equivalent add_view default.

Two additional keyword arguments which will be passed to the
venusianattach function are _depth and _category.

_depth is provided for people who wish to reuse this class from another
decorator. The default value is 0 and should be specified relative to
the view_config invocation. It will be passed in to the
venusianattach function as the depth of the callstack when
Venusian checks if the decorator is being used in a class or module
context. It's not often used, but it can be useful in this circumstance.

_category sets the decorator category name. It can be useful in
combination with the category argument of scan to control which
views should be processed.

See the venusian.attach() function in Venusian for more
information about the _depth and _category arguments.

A class decorator which, when applied to a class, will
provide defaults for all view configurations that use the class. This
decorator accepts all the arguments accepted by
pyramid.view.view_config(), and each has the same meaning.

The notfound_view_config constructor accepts most of the same arguments
as the constructor of pyramid.view.view_config. It can be used
in the same places, and behaves in largely the same way, except it always
registers a not found exception view instead of a 'normal' view.

All arguments except append_slash have the same meaning as
pyramid.view.view_config() and each predicate
argument restricts the set of circumstances under which this notfound
view will be invoked.

If append_slash is True, when the Not Found View is invoked, and
the current path info does not end in a slash, the notfound logic will
attempt to find a route that matches the request's path info
suffixed with a slash. If such a route exists, Pyramid will issue a
redirect to the URL implied by the route; if it does not, Pyramid will
return the result of the view callable provided as view, as normal.

If the argument provided as append_slash is not a boolean but
instead implements IResponse, the
append_slash logic will behave as if append_slash=True was passed,
but the provided class will be used as the response class instead of
the default HTTPTemporaryRedirect
response class when a redirect is performed. For example:

The above means that a redirect to a slash-appended route will be
attempted, but instead of
HTTPTemporaryRedirect
being used, HTTPMovedPermanentlywillbeused for the redirect response if a slash-appended route is found.

The forbidden_view_config constructor accepts most of the same arguments
as the constructor of pyramid.view.view_config. It can be used
in the same places, and behaves in largely the same way, except it always
registers a forbidden exception view instead of a 'normal' view.

Example:

frompyramid.viewimportforbidden_view_configfrompyramid.responseimportResponse@forbidden_view_config()defforbidden(request):returnResponse('You are not allowed',status='403 Forbidden')

All arguments passed to this function have the same meaning as
pyramid.view.view_config() and each predicate argument restricts
the set of circumstances under which this notfound view will be invoked.

The exception_view_config constructor requires an exception context,
and additionally accepts most of the same arguments as the constructor of
pyramid.view.view_config. It can be used in the same places,
and behaves in largely the same way, except it always registers an
exception view instead of a "normal" view that dispatches on the request
context.

All arguments passed to this function have the same meaning as
pyramid.view.view_config(), and each predicate argument restricts
the set of circumstances under which this exception view will be invoked.