コード例 #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()