diff options
| author | 2018-04-08 01:07:41 +0100 | |
|---|---|---|
| committer | 2018-04-08 01:07:41 +0100 | |
| commit | 8235adbecdf09ffe2e8b7a04a38d0be2d86fd5d4 (patch) | |
| tree | c126eef18d6bb10306d577bb5673a1f2a1bb2e88 /pysite/views/error_handlers | |
| parent | [Wiki] Shorten edit/view links in sidebar (diff) | |
Easier debugging and optimised imports
Simply set FLASK_DEBUG=1 in your env to skip OAuth checks
Diffstat (limited to 'pysite/views/error_handlers')
| -rw-r--r-- | pysite/views/error_handlers/http_4xx.py | 6 | ||||
| -rw-r--r-- | pysite/views/error_handlers/http_5xx.py | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/pysite/views/error_handlers/http_4xx.py b/pysite/views/error_handlers/http_4xx.py index 48ae7f0f..2d6c54c6 100644 --- a/pysite/views/error_handlers/http_4xx.py +++ b/pysite/views/error_handlers/http_4xx.py @@ -11,7 +11,6 @@ class Error400View(ErrorView): error_code = range(400, 430) def __init__(self): - # Direct errors for all methods at self.return_error methods = [ 'get', 'post', 'put', @@ -27,7 +26,6 @@ class Error400View(ErrorView): return self.render( "errors/error.html", code=error.code, req=request, error_title=error_desc, - error_message=error_desc + - " If you believe we have made a mistake, please " - "<a href='https://github.com/discord-python/site/issues'>open an issue on our GitHub</a>." + error_message=f"{error_desc} If you believe we have made a mistake, please " + "<a href='https://github.com/discord-python/site/issues'>open an issue on our GitHub</a>." ), error.code diff --git a/pysite/views/error_handlers/http_5xx.py b/pysite/views/error_handlers/http_5xx.py index 14c016c5..46c65e38 100644 --- a/pysite/views/error_handlers/http_5xx.py +++ b/pysite/views/error_handlers/http_5xx.py @@ -36,7 +36,7 @@ class Error500View(ErrorView): return self.render( "errors/error.html", code=error.code, req=request, error_title=error_desc, error_message="An error occurred while processing this request, please try " - "again later. If you believe we have made a mistake, please " - "<a href='https://github.com/discord-python/site/issues'>file an issue on our" - " GitHub</a>." + "again later. If you believe we have made a mistake, please " + "<a href='https://github.com/discord-python/site/issues'>file an issue on our" + " GitHub</a>." ), error.code |