Ignore:
Timestamp:
Aug 9, 2009, 6:45:35 PM (15 years ago)
Author:
quentin
Message:

Upgrade info page to Mako

File:
1 edited

Legend:

Unmodified
Added
Removed
  • package_branches/invirt-web/cherrypy/code/main.py

    r2410 r2411  
    6666        return d
    6767    index=list
     68
     69    @cherrypy.expose
     70    @cherrypy.tools.mako(filename="/info.mako")
     71    def info(self, machine_id):
     72        """Handler for info on a single VM."""
     73        machine = validation.Validate(cherrypy.request.login, cherrypy.request.state, machine_id=machine_id).machine
     74        d = infoDict(cherrypy.request.login, cherrypy.request.state, machine)
     75        checkpoint.checkpoint('Got infodict')
     76        return d
    6877
    6978    @cherrypy.expose
     
    606615    return d
    607616
    608 def info(username, state, path, fields):
    609     """Handler for info on a single VM."""
    610     machine = validation.Validate(username, state, machine_id=fields.getfirst('machine_id')).machine
    611     d = infoDict(username, state, machine)
    612     checkpoint.checkpoint('Got infodict')
    613     return templates.info(searchList=[d])
    614 
    615617def unauthFront(_, _2, _3, fields):
    616618    """Information for unauth'd users."""
     
    637639               command=command,
    638640               modify=modify,
    639                info=info,
    640641               create=create,
    641642               unauth=unauthFront,
Note: See TracChangeset for help on using the changeset viewer.