diff options
| author | 2018-04-09 10:34:00 +0100 | |
|---|---|---|
| committer | 2018-04-09 10:34:00 +0100 | |
| commit | afc30354493ef346138281c4115118b8b0dde01b (patch) | |
| tree | 9e3ee401d89a461c2372d6f16aebf6baa6367feb /pysite/views/error_handlers | |
| parent | Contribs too picky, need new payment logos (diff) | |
| parent | Added Python 3 cheat sheet to resources.json (diff) | |
Merge remote-tracking branch 'origin/master'
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 |