def get_templates_names(cls, db): templates = yield get_by_query(db.templates, projection={ '_id': 0, 'name': 1 }) return [t['name'] for t in templates]
def get_templates_names(cls, db): templates = yield get_by_query( db.templates, projection={'_id': 0, 'name': 1}) return [t['name'] for t in templates]
def get_by_query(cls, db, query): result = yield get_by_query(db.boards, query, cls.PROJECTION) return result