From 4b4905db5f4123a88dca9f0164a3a35679a9dc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Tue, 4 May 2010 12:36:58 +0200 Subject: More controller stuff --- index.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'index.py') diff --git a/index.py b/index.py index d9e2e7d..aaf0f75 100755 --- a/index.py +++ b/index.py @@ -8,10 +8,16 @@ import model # URL Mappings # urls = ( - "/r/(.*)", controller.Redirect, - "/(.*)", controller.Page + "/add/?", controller.Add, + "/edit/(\d+)", controller.Edit, + "/const/?", controller.Const, + "/const/add/?", controller.ConstAdd, + "/const/edit/(\d+)", controller.ConstEdit, + "/cat/?(/\d+)?", controller.Cat, + "/(\d\d\d\d)/(\d\d)", controller.Show, + "/", controller.Show, + "/(.*)", controller.FourOhFour ) - # # ORM # @@ -33,7 +39,7 @@ def handle_sql(handler): # The App # app = web.application(urls, globals()) -app.notfound = controller.FourOhFour +app.notfound = controller.FourOhFour.catch # add orm processor app.add_processor(handle_sql) -- cgit v1.2.3