diff options
| author | 2018-02-06 01:01:59 +0000 | |
|---|---|---|
| committer | 2018-02-06 01:01:59 +0000 | |
| commit | 1fed2a2cdcacd3bfcc0b69f7b1a1bb536c8e5268 (patch) | |
| tree | 6ec570b58a6652a7ac935c75b4296bcf5f4509b5 /pysite/views/error_handlers | |
| parent | flake8-todo too pedantic for us - hopefully travis didn't cache it (diff) | |
Revert "Finally fix this garbage"
This reverts commit 57abb43
Diffstat (limited to 'pysite/views/error_handlers')
| -rw-r--r-- | pysite/views/error_handlers/__init__.py | 3 | ||||
| -rw-r--r-- | pysite/views/error_handlers/http_404.py | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/pysite/views/error_handlers/__init__.py b/pysite/views/error_handlers/__init__.py new file mode 100644 index 00000000..ba286add --- /dev/null +++ b/pysite/views/error_handlers/__init__.py @@ -0,0 +1,3 @@ +# coding=utf-8 + +__author__ = "Gareth Coles" diff --git a/pysite/views/error_handlers/http_404.py b/pysite/views/error_handlers/http_404.py new file mode 100644 index 00000000..eea1e630 --- /dev/null +++ b/pysite/views/error_handlers/http_404.py @@ -0,0 +1,14 @@ +# coding=utf-8 +from werkzeug.exceptions import NotFound + +from pysite.base_route import ErrorView + +__author__ = "Gareth Coles" + + +class Error404View(ErrorView): + name = "error_404" + error_code = 404 + + def get(self, error: NotFound): + return "replace me with a template, 404 not found", 404 |