--- a/pvl/verkko/urls.py Wed Oct 10 23:36:23 2012 +0300
+++ b/pvl/verkko/urls.py Wed Oct 10 23:44:37 2012 +0300
@@ -4,10 +4,23 @@
return Rule(string, endpoint=endpoint, **opts)
# URL -> Handler
-from pvl.verkko import web, hosts
+from pvl.verkko import hosts
+
+# index page here :)
+from pvl.verkko import web
+class Index (web.Handler) :
+ def render (self) :
+ html = web.html
+
+ return (
+ html.ul(
+ # TODO: self.url
+ html.a(href=self.url(hosts.IndexHandler))("DHCP Hosts"),
+ )
+ )
urls = Map((
- rule('/', web.Index),
+ rule('/', Index),
rule('/hosts/', hosts.IndexHandler),
rule('/hosts/<int:id>', hosts.ItemHandler),
rule('/hosts/<attr>/<value>', hosts.ListHandler),