seitime-frappe/frappe/website/page_renderers/error_page.py
Suraj Shetty c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30

11 lines
391 B
Python

from frappe.website.page_renderers.template_page import TemplatePage
class ErrorPage(TemplatePage):
def __init__(self, path=None, http_status_code=None, exception=None):
path = "error"
super().__init__(path=path, http_status_code=http_status_code)
self.http_status_code = getattr(exception, "http_status_code", None) or http_status_code or 500
def can_render(self):
return True