aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/views/main
diff options
context:
space:
mode:
Diffstat (limited to 'pysite/views/main')
-rw-r--r--pysite/views/main/error_handlers/__init__.py1
-rw-r--r--pysite/views/main/error_handlers/http_404.py12
-rw-r--r--pysite/views/main/error_handlers/http_5xx.py12
-rw-r--r--pysite/views/main/index.py2
-rw-r--r--pysite/views/main/ws_test.py2
5 files changed, 2 insertions, 27 deletions
diff --git a/pysite/views/main/error_handlers/__init__.py b/pysite/views/main/error_handlers/__init__.py
deleted file mode 100644
index 9bad5790..00000000
--- a/pysite/views/main/error_handlers/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-# coding=utf-8
diff --git a/pysite/views/main/error_handlers/http_404.py b/pysite/views/main/error_handlers/http_404.py
deleted file mode 100644
index 1d557d9b..00000000
--- a/pysite/views/main/error_handlers/http_404.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# coding=utf-8
-from werkzeug.exceptions import NotFound
-
-from pysite.base_route import ErrorView
-
-
-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/main/error_handlers/http_5xx.py b/pysite/views/main/error_handlers/http_5xx.py
deleted file mode 100644
index ed4d8d82..00000000
--- a/pysite/views/main/error_handlers/http_5xx.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# coding=utf-8
-from werkzeug.exceptions import HTTPException
-
-from pysite.base_route import ErrorView
-
-
-class Error404View(ErrorView):
- name = "error_5xx"
- error_code = range(500, 600)
-
- def get(self, error: HTTPException):
- return "Internal server error. Please try again later!", error.code
diff --git a/pysite/views/main/index.py b/pysite/views/main/index.py
index 0c2d1578..210eb057 100644
--- a/pysite/views/main/index.py
+++ b/pysite/views/main/index.py
@@ -7,4 +7,4 @@ class IndexView(RouteView):
name = "index"
def get(self):
- return self.render("index.html")
+ return self.render("main/index.html")
diff --git a/pysite/views/main/ws_test.py b/pysite/views/main/ws_test.py
index c28269a8..c53515c5 100644
--- a/pysite/views/main/ws_test.py
+++ b/pysite/views/main/ws_test.py
@@ -10,6 +10,6 @@ class WSTest(RouteView):
def get(self):
return self.render(
- "ws_test.html",
+ "main/ws_test.html",
server_name=os.environ.get("SERVER_NAME", "localhost")
)