Example #1
0
 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()
Example #2
0
 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()
Example #3
0
 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)
Example #4
0
    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)