summaryrefslogtreecommitdiff
path: root/controller.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--controller.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/controller.py b/controller.py
new file mode 100644
index 0000000..e4c07f7
--- /dev/null
+++ b/controller.py
@@ -0,0 +1,19 @@
+from __future__ import with_statement
+
+import web
+from helper import appdir
+from renderer import render
+
+class Page:
+ """
+ All the general and simple pages.
+ """
+ def GET(self, name = '/'):
+ if not name or name == '/': name = 'index'
+ return render(name)
+
+def FourOhFour(page="?"):
+ """
+ 404 error page.
+ """
+ return web.notfound(render("404", level = "", page = page))