The module draco provides some global definitions and exceptions.
- cfg_version
-
A string indicating Draco's version.
- cfg_bindir
-
The directory where the Draco utility programs are installed.
- cfg_datadir
-
The directory where the Draco support files are installed.
Handlers and templates can end the http request at any time by raising a
HttpResponse exception. Below is a list of available exceptions.
They are modeled as the subset of the http response codes that are applicable
to Draco handlers and templates. Some HttpResponse subclasses take
an optional message parameter. If Draco is in debugging mode, the
error is not reported but instead a code 200 (HTTP_OK) is returned together
with this message and a backtrace.
-
-
The base class for all http responses.
-
-
The base class for all redirection (3xx) codes.
-
-
A resource was moved permanently. When raised, the current http request is
terminated and a code 301 is returned. You should provide a "Location"
http header to indicate where the resource has moved to.
-
-
A resource was found but resides under a different URL. When raised, the
current http request is terminated and a code 302 is returned. You should
provide a "Location" http header to indicate where the resource can be
found.
-
-
The base class for all client (4xx) errors.
-
-
An illegal request has been made. When raised, this terminates the http
request with a code 400.
-
-
Access to a resource was denied. When raised this terminates the http
request with a code 403.
-
-
A resouce was requested that could not be found. When raised this terminates
the http request with a code 404.
-
-
A resource was requested that is permanently gone. When raised this
terminates the http request with a code 410.
-
-
Base class for all server (5xx) errors.
-
-
An internal server error has occurred. When raised, this terminates the http
request with a code 500.
-
-
A resource is temporarily unavailable. When raised, this terminates the http
request with a code 503.