MCPcopy
hub / github.com/django/django / register_model

Method register_model

django/db/migrations/state.py:720–727  ·  view source on GitHub ↗
(self, app_label, model)

Source from the content-addressed store, hash-verified

718 return clone
719
720 def register_model(self, app_label, model):
721 self.all_models[app_label][model._meta.model_name] = model
722 if app_label not in self.app_configs:
723 self.app_configs[app_label] = AppConfigStub(app_label)
724 self.app_configs[app_label].apps = self
725 self.app_configs[app_label].models[model._meta.model_name] = model
726 self.do_pending_operations(model)
727 self.clear_cache()
728
729 def unregister_model(self, app_label, model_name):
730 try:

Callers 1

__new__Method · 0.45

Calls 3

AppConfigStubClass · 0.85
do_pending_operationsMethod · 0.80
clear_cacheMethod · 0.45

Tested by

no test coverage detected