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): (source)

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

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

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): (source)

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): (source)

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

ERROR_400_TEMPLATE_NAME: str = (source)

Undocumented

Value
'400.html'
ERROR_403_TEMPLATE_NAME: str = (source)

Undocumented

Value
'403.html'
ERROR_404_TEMPLATE_NAME: str = (source)

Undocumented

Value
'404.html'
ERROR_500_TEMPLATE_NAME: str = (source)

Undocumented

Value
'500.html'
ERROR_PAGE_TEMPLATE: str = (source)

Undocumented

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