Unauthenticated front page
[invirt/packages/invirt-web.git] / code / main.py
index baf4ff9..361fbbd 100755 (executable)
@@ -47,6 +47,12 @@ from invirt.common import InvalidInput, CodeError
 
 from view import View
 
 
 from view import View
 
+class InvirtUnauthWeb(View):
+    @cherrypy.expose
+    @cherrypy.tools.mako(filename="/unauth.mako")
+    def index(self):
+        return {'simple': True}
+
 class InvirtWeb(View):
     def __init__(self):
         super(self.__class__,self).__init__()
 class InvirtWeb(View):
     def __init__(self):
         super(self.__class__,self).__init__()
@@ -654,13 +660,7 @@ def infoDict(username, state, machine):
              fields = fields)
     return d
 
              fields = fields)
     return d
 
-def unauthFront(_, _2, _3, fields):
-    """Information for unauth'd users."""
-    return templates.unauth(searchList=[{'simple' : True, 
-            'hostname' : socket.getfqdn()}])
-
-mapping = dict(
-               unauth=unauthFront)
+mapping = dict()
 
 def printHeaders(headers):
     """Print a dictionary as HTTP headers."""
 
 def printHeaders(headers):
     """Print a dictionary as HTTP headers."""