def get(self): streams = Stream.query().fetch() ndb.delete_multi(stream_name_set.query().fetch(keys_only=True)) for stream in streams: name_set = stream_name_set() name_set.name = stream.name name_set.put()
def get(self): return_list = list() name_sets = stream_name_set.query().fetch() # print(name_sets) for name_set in name_sets: return_list.append(str(name_set.name)) print(name_set.name) # return_dic = {"nameList" , return_list} self.response.headers["Content-Type"] = "application/json" return_list.sort() return_list = json.dumps(return_list) self.response.out.write(return_list)
def get(self): return_list = list() name_sets = stream_name_set.query().fetch() #print(name_sets) for name_set in name_sets: return_list.append(str(name_set.name)) print(name_set.name) # return_dic = {"nameList" , return_list} self.response.headers['Content-Type'] = 'application/json' return_list.sort() return_list = json.dumps(return_list) self.response.out.write(return_list)