media_property
Creates a property that dynamically aggregates Media definitions from a class and its superclasses, supporting inheritance and selective extension of media assets.
def media_property(
cls: type
) - > property
Wraps a class with a property that dynamically resolves and merges Django Media definitions from the class and its inheritance hierarchy.
Parameters
| Name | Type | Description |
|---|---|---|
| cls | type | The class for which the media property is being created, used to look up the inner Media class and superclass assets. |
Returns
| Type | Description |
|---|---|
property | A property object that, when accessed, returns a Media instance containing the combined assets of the class and its parents. |