def get(self): doc = common.Document(title='pushmaster: recent pushes') pushes = query.open_pushes() doc.body(T.h1('Recent Pushes'), T.ol(map(push_item, pushes), class_='requests')) doc.serialize(self.response.out)
def get(self): doc = common.Document(title='pushmaster: pushes') pushes = query.open_pushes() push_list = T.ol(map(push_item, pushes)) doc.body(T.h1('Recent Pushes')) doc.body(push_list) doc.body(common.jquery_js, common.jquery_ui_js, common.pushmaster_js) doc.serialize(self.response.out)
def get(self): """List pushes""" pushes = query.open_pushes() response = {'pushes': [push.json for push in pushes]} self.response.headers['Content-Type'] = 'application/json' self.response.out.write(json.dumps(response))
def get(self): """List pushes""" pushes = query.open_pushes() response = {'pushes': [push.json for push in pushes]} self.response.out.write(json.dumps(response))