web/contentment/taxonomy.py
def replace(self, target):
		"""Replace an asset, specified by the parameter, with this asset."""
		
		target = self.clone().get(id=target) if isinstance(target, ObjectId) else target
		obj = self.clone().first()
		
		obj.name = target.name
		obj.parent = target.parent
		obj.parents = target.parents
		obj.path = target.path
		obj.order = target.order
		
		target.delete()
		obj.save()
		
		return self
Replace an asset, specified by the parameter, with this asset.
Replace an asset, specified by the parameter, with this asset.
Replace an asset specified by the parameter with this asset .
def replace(self, target):
		target = self.clone().get(id=target) if isinstance(target, ObjectId) else target
		obj = self.clone().first()
		obj.name = target.name
		obj.parent = target.parent
		obj.parents = target.parents
		obj.path = target.path
		obj.order = target.order
		target.delete()
		obj.save()
		return self
def replace ( self , target ) : target = self . clone ( ) . get ( id = target ) if isinstance ( target , ObjectId ) else target obj = self . clone ( ) . first ( ) obj . name = target . name obj . parent = target . parent obj . parents = target . parents obj . path = target . path obj . order = target . order target . delete ( ) obj . save ( ) return self
Replace an asset, specified by the parameter, with this asset.
Replace an asset specified by the parameter with this asset .
"""Replace an asset, specified by the parameter, with this asset."""
self
target