def set_item_create(self, data): path = data['_path'] kind = db.get_type(data['_kind']) attr = dict(without_underscores(data)) attr.setdefault('name', os.path.basename(path)) folder = db.resolve(os.path.dirname(path)) yield db.make(kind, folder=folder, **attr) yield folder
def _item(self, data): return db.resolve(data['_path'])