diff options
author | 2018-03-01 14:59:42 +0000 | |
---|---|---|
committer | 2018-03-01 15:00:03 +0000 | |
commit | cd17fbe9df35a9312c067374cf4c395ae0c7a09e (patch) | |
tree | 59cf35667f8124d3c44a15ff7f6d60e5975478a9 | |
parent | Darken background of muted error header (diff) |
Finish up #31 by adding links
-rw-r--r-- | pysite/views/error_handlers/http_4xx.py | 6 | ||||
-rw-r--r-- | pysite/views/error_handlers/http_5xx.py | 7 | ||||
-rw-r--r-- | static/js/500.js | 2 | ||||
-rw-r--r-- | templates/errors/error.html | 2 |
4 files changed, 8 insertions, 9 deletions
diff --git a/pysite/views/error_handlers/http_4xx.py b/pysite/views/error_handlers/http_4xx.py index 1417c1f6..884c3eb4 100644 --- a/pysite/views/error_handlers/http_4xx.py +++ b/pysite/views/error_handlers/http_4xx.py @@ -17,6 +17,6 @@ class Error400View(ErrorView): error_message=error_desc + " If you believe we have made a mistake, " "please open an issue " - "on our GitHub (" - "https://github.com" - "/discord-python/site/issues)."), error.code + "on our" + " <a href='https://github.com" + "/discord-python/site/issues'>GitHub</a>."), error.code diff --git a/pysite/views/error_handlers/http_5xx.py b/pysite/views/error_handlers/http_5xx.py index ecf4a35e..c1bc646e 100644 --- a/pysite/views/error_handlers/http_5xx.py +++ b/pysite/views/error_handlers/http_5xx.py @@ -19,7 +19,6 @@ class Error500View(ErrorView): "request, please try " "again later. " "If you believe we have made a mistake, " - "please open an issue " - "on our GitHub (" - "https://github.com" - "/discord-python/site/issues)."), error.code + "please file an issue on our" + " <a href='https://github.com" + "/discord-python/site/issues'>GitHub</a>."), error.code diff --git a/static/js/500.js b/static/js/500.js index f8407da1..72a9fc9a 100644 --- a/static/js/500.js +++ b/static/js/500.js @@ -31,7 +31,7 @@ typewriter.appendText('Python 3.6.4 (default, Jan 5 2018, 02:35:40)\n') .deleteChars(7) .pauseFor(1000) .typeString("response.text\n") - .appendText("'" + window._ErrorMsg + "'\n>>> ") + .appendText("" + window._ErrorMsg + "\n>>> ") .start(); function closeWindow(){ diff --git a/templates/errors/error.html b/templates/errors/error.html index 5b1ba462..87d7f984 100644 --- a/templates/errors/error.html +++ b/templates/errors/error.html @@ -5,7 +5,7 @@ <script> window._RequestMethod = "{{ request.method.lower() }}"; window._Code = {{ code }}; - window._ErrorMsg = "{{ error_message }}" + window._ErrorMsg = "{{ error_message | safe }}" window._Path = "{{ request.path }}" </script> <div class="uk-background-muted"> |