def is_list_name_unique(self, owner_id, name, key=None): owner = self.get_owner(owner_id) q = ListDb.all().filter('owner = ', owner).filter('name =', name) if key is not None: q = q.filter('__key__ !=', key) return q.count(1) == 0
def add_list(self, owner_id, name, desc): owner = self.get_owner(owner_id) return ListDb(name=name, description=desc, owner=owner).put()
def is_list_name_unique(self, owner_id, name, key=None): owner = self.get_owner(owner_id) q = ListDb.all().filter("owner = ", owner).filter("name =", name) if key is not None: q = q.filter("__key__ !=", key) return q.count(1) == 0
def get_list(self, list_id): return ListDb.get_by_id(list_id)