MCPcopy
hub / github.com/django/django / get_model_admin

Method get_model_admin

django/contrib/admin/sites.py:170–174  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

168 return model in self._registry
169
170 def get_model_admin(self, model):
171 try:
172 return self._registry[model]
173 except KeyError:
174 raise NotRegistered(f"The model {model.__name__} is not registered.")
175
176 def add_action(self, action, name=None):
177 """

Callers 15

registerMethod · 0.95
field_admin_orderingMethod · 0.80
formfield_for_dbfieldMethod · 0.80
get_field_querysetMethod · 0.80
format_callbackFunction · 0.80
process_requestMethod · 0.80
model_adminFunction · 0.80

Calls 1

NotRegisteredClass · 0.90