pvl/verkko/urls.py
changeset 7 7baf4cccb4a9
parent 5 91970ce3fc6b
child 8 f64c44640b15
--- 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),