aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views
diff options
context:
space:
mode:
authorGravatar martmists <[email protected]>2018-02-05 20:26:54 +0100
committerGravatar martmists <[email protected]>2018-02-05 20:26:54 +0100
commit80a1ab522e7a49f3ea1168d8658fbff293c866f1 (patch)
tree206a45b1a68c273db43ad04b105bcd3e7c48f565 /pysite/views
parentDynamic route loader; proper application structure (diff)
Major update
- Switch to Japronto - More linters - Rewrite route handling - Rewrite error handling - Rewrite static handling - Error when no `Index` propery is found - Probably some more stuff? idk Code needs testing; Maybe we could use pytest? Signed-off-by: martmists <[email protected]>
Diffstat (limited to 'pysite/views')
-rw-r--r--pysite/views/__init__.py3
-rw-r--r--pysite/views/error_handlers/__init__.py3
-rw-r--r--pysite/views/error_handlers/http_404.py14
-rw-r--r--pysite/views/healthcheck.py15
-rw-r--r--pysite/views/index.py12
-rw-r--r--pysite/views/invite.py15
6 files changed, 0 insertions, 62 deletions
diff --git a/pysite/views/__init__.py b/pysite/views/__init__.py
deleted file mode 100644
index ba286add..00000000
--- a/pysite/views/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# coding=utf-8
-
-__author__ = "Gareth Coles"
diff --git a/pysite/views/error_handlers/__init__.py b/pysite/views/error_handlers/__init__.py
deleted file mode 100644
index ba286add..00000000
--- a/pysite/views/error_handlers/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-# coding=utf-8
-
-__author__ = "Gareth Coles"
diff --git a/pysite/views/error_handlers/http_404.py b/pysite/views/error_handlers/http_404.py
deleted file mode 100644
index eea1e630..00000000
--- a/pysite/views/error_handlers/http_404.py
+++ /dev/null
@@ -1,14 +0,0 @@
-# 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
diff --git a/pysite/views/healthcheck.py b/pysite/views/healthcheck.py
deleted file mode 100644
index 660c8a96..00000000
--- a/pysite/views/healthcheck.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# coding=utf-8
-from flask import jsonify
-
-from pysite.base_route import BaseView
-
-
-__author__ = "Gareth Coles"
-
-
-class IndexView(BaseView):
- path = "/healthcheck"
- name = "healthcheck"
-
- def get(self):
- return jsonify({"status": "ok"})
diff --git a/pysite/views/index.py b/pysite/views/index.py
deleted file mode 100644
index 2e779003..00000000
--- a/pysite/views/index.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# coding=utf-8
-from pysite.base_route import BaseView
-
-__author__ = "Gareth Coles"
-
-
-class IndexView(BaseView):
- path = "/"
- name = "index"
-
- def get(self):
- return "Coming soon:tm:"
diff --git a/pysite/views/invite.py b/pysite/views/invite.py
deleted file mode 100644
index d035fc99..00000000
--- a/pysite/views/invite.py
+++ /dev/null
@@ -1,15 +0,0 @@
-# coding=utf-8
-from flask import redirect
-
-from pysite.base_route import BaseView
-
-
-__author__ = "Gareth Coles"
-
-
-class InviteView(BaseView):
- path = "/invite"
- name = "invite"
-
- def get(self):
- return redirect("http://invite.pythondiscord.com/")