module documentation

Undocumented

Function bad​_request 400 error handler.
Function page​_not​_found Default 404 handler.
Function permission​_denied Permission denied (403) handler.
Function server​_error 500 error handler.
Constant ERROR​_400​_TEMPLATE​_NAME Undocumented
Constant ERROR​_403​_TEMPLATE​_NAME Undocumented
Constant ERROR​_404​_TEMPLATE​_NAME Undocumented
Constant ERROR​_500​_TEMPLATE​_NAME Undocumented
Constant ERROR​_PAGE​_TEMPLATE Undocumented
@requires_csrf_token
def bad_request(request, exception, template_name=ERROR_400_TEMPLATE_NAME):

400 error handler.

Templates: :template:`400.html` Context: None

@requires_csrf_token
def page_not_found(request, exception, template_name=ERROR_404_TEMPLATE_NAME):

Default 404 handler.

Templates: :template:`404.html` Context:

request_path
The path of the requested URL (e.g., '/app/pages/bad_page/'). It's quoted to prevent a content injection attack.
exception
The message from the exception which triggered the 404 (if one was supplied), or the exception class name
@requires_csrf_token
def permission_denied(request, exception, template_name=ERROR_403_TEMPLATE_NAME):

Permission denied (403) handler.

Templates: :template:`403.html` Context:

exception
The message from the exception which triggered the 403 (if one was supplied).

If the template does not exist, an Http403 response containing the text "403 Forbidden" (as per RFC 7231) will be returned.

@requires_csrf_token
def server_error(request, template_name=ERROR_500_TEMPLATE_NAME):

500 error handler.

Templates: :template:`500.html` Context: None

ERROR_400_TEMPLATE_NAME: str =

Undocumented

Value
'400.html'
ERROR_403_TEMPLATE_NAME: str =

Undocumented

Value
'403.html'
ERROR_404_TEMPLATE_NAME: str =

Undocumented

Value
'404.html'
ERROR_500_TEMPLATE_NAME: str =

Undocumented

Value
'500.html'
ERROR_PAGE_TEMPLATE: str =

Undocumented

Value
'''
<!doctype html>
<html lang="en">
<head>
  <title>%(title)s</title>
</head>
<body>
...