Skip to main content

must_inherit_from

Returns a list containing a Django system check error indicating that a specific option value must inherit from a designated parent class.

def must_inherit_from(
parent: string,
option: string,
obj: object,
id: string
) - > list

Generates a list containing a validation error indicating that a specific configuration option must inherit from a designated parent class.

Parameters

NameTypeDescription
parentstringThe name of the required parent class that the object should inherit from.
optionstringThe name of the configuration setting or option being validated.
objobjectThe object instance whose class is being checked for proper inheritance.
idstringA unique identifier for the error message, typically used for Django system check categorization.

Returns

TypeDescription
listA list containing a single Django system check Error object detailing the inheritance violation.