MCPcopy
hub / github.com/django/django / __init_subclass__

Method __init_subclass__

django/contrib/admin/options.py:721–731  ·  view source on GitHub ↗
(cls, **kwargs)

Source from the content-addressed store, hash-verified

719 checks_class = ModelAdminChecks
720
721 def __init_subclass__(cls, **kwargs) -> None:
722 super().__init_subclass__(**kwargs)
723 if cls.__dict__.get("list_select_related") is True:
724 # RemovedInDjango70Warning: when the deprecation ends, raise a
725 # ValueError.
726 warnings.warn(
727 "Setting ModelAdmin.list_select_related to True is deprecated. "
728 "Use False or a list or tuple of fields to fetch instead.",
729 RemovedInDjango70Warning,
730 skip_file_prefixes=django_file_prefixes(),
731 )
732
733 def __init__(self, model, admin_site):
734 self.model = model

Callers

nothing calls this directly

Calls 2

django_file_prefixesFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected