示例#1
0
文件: hosts.py 项目: mamico/whiskers
 def host_view(self):
     host_id = self.request.matchdict['host_id']
     host = Host.get_by_id(int(host_id))
     buildouts = self.get_buildouts(host_id)
     return {'host': host,
             'main': self.main,
             'buildouts': buildouts}
示例#2
0
 def host_view(self):
     host_id = self.request.matchdict['host_id']
     try:
         host = Host.get_by_id(int(host_id))
         buildouts = self.get_buildouts(host_id)
     except NoResultFound as e:
         host = None
         buildouts = []
     return {'host': host,
             'main': self.main,
             'buildouts': buildouts}
示例#3
0
 def get(self):
     host_id = self.request.matchdict.get('host_id')
     host = Host.get_by_id(host_id)
     return host.get_as_dict()
示例#4
0
 def get(self):
     host_id = self.request.matchdict.get('host_id')
     host = Host.get_by_id(host_id)
     return host.get_as_dict()