MCPcopy
hub / github.com/django/django / check_apps_ready

Method check_apps_ready

django/apps/registry.py:129–138  ·  view source on GitHub ↗

Raise an exception if all apps haven't been imported yet.

(self)

Source from the content-addressed store, hash-verified

127 self.ready_event.set()
128
129 def check_apps_ready(self):
130 """Raise an exception if all apps haven't been imported yet."""
131 if not self.apps_ready:
132 from django.conf import settings
133
134 # If "not ready" is due to unconfigured settings, accessing
135 # INSTALLED_APPS raises a more helpful ImproperlyConfigured
136 # exception.
137 settings.INSTALLED_APPS
138 raise AppRegistryNotReady("Apps aren't loaded yet.")
139
140 def check_models_ready(self):
141 """Raise an exception if all models haven't been imported yet."""

Callers 6

get_app_configsMethod · 0.95
get_app_configMethod · 0.95
get_modelMethod · 0.95
is_installedMethod · 0.95
get_modelMethod · 0.80

Calls 1

AppRegistryNotReadyClass · 0.90

Tested by

no test coverage detected