Changeset 2391 for package_branches/invirt-web/cherrypy/code/main.py
- Timestamp:
- Aug 9, 2009, 6:45:23 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
package_branches/invirt-web/cherrypy/code/main.py
r2390 r2391 52 52 super(self.__class__,self).__init__() 53 53 connect() 54 self._cp_config['tools.require_login.on'] = True 54 55 55 56 @cherrypy.expose 57 @cherrypy.tools.mako(filename="/list.mako") 58 def list(self, username): 59 """Handler for list requests.""" 60 checkpoint.checkpoint('Getting list dict') 61 d = getListDict(username, state) 62 checkpoint.checkpoint('Got list dict') 63 return templates.list(searchList=[d]) 64 index=list 65 66 @cherrypy.expose 67 @cherrypy.tools.mako(filename="/helloworld.mako") 56 68 def helloworld(self): 57 return "Hello world!" 69 return {} 70 return "Hello world!\nYour request: "+repr(dir(cherrypy.request)) 71 helloworld._cp_config['tools.require_login.on'] = False 58 72 59 73 def pathSplit(path): … … 229 243 return d 230 244 231 def listVms(username, state, path, fields):232 """Handler for list requests."""233 checkpoint.checkpoint('Getting list dict')234 d = getListDict(username, state)235 checkpoint.checkpoint('Got list dict')236 return templates.list(searchList=[d])237 238 245 def vnc(username, state, path, fields): 239 246 """VNC applet page. … … 638 645 raise RuntimeError("test of the emergency broadcast system") 639 646 640 mapping = dict( list=listVms,647 mapping = dict(#list=listVms, 641 648 vnc=vnc, 642 649 command=command,
Note: See TracChangeset
for help on using the changeset viewer.