create_item#
- ADR.create_item(item_type: type[Item], **kwargs: Any) Item#
Create and persist a new
Itemof the given type.- Parameters:
- item_typetype[
Item] Concrete
Itemsubclass (e.g.String,HTML).- **kwargs
Any Field values to use when constructing the new item.
- item_typetype[
- Returns:
ItemThe newly created item instance.
- Raises:
TypeErrorIf
item_typeis not a subclass ofItem.ADRExceptionIf no keyword arguments are provided.