create_item#

ADR.create_item(item_type: type[Item], **kwargs: Any) Item#

Create and persist a new Item of the given type.

Parameters:
item_typetype[Item]

Concrete Item subclass (e.g. String, HTML).

**kwargsAny

Field values to use when constructing the new item.

Returns:
Item

The newly created item instance.

Raises:
TypeError

If item_type is not a subclass of Item.

ADRException

If no keyword arguments are provided.