MCPcopy Index your code
hub / github.com/django-haystack/django-haystack / haystack_get_models

Function haystack_get_models

haystack/utils/app_loading.py:20–30  ·  view source on GitHub ↗
(label)

Source from the content-addressed store, hash-verified

18
19
20def haystack_get_models(label):
21 try:
22 app_mod = apps.get_app_config(label)
23 return app_mod.get_models()
24 except LookupError:
25 if "." not in label:
26 raise ImproperlyConfigured("Unknown application label {}".format(label))
27 app_label, model_name = label.rsplit(".", 1)
28 return [apps.get_model(app_label, model_name)]
29 except ImproperlyConfigured:
30 pass
31
32
33def haystack_get_model(app_label, model_name):

Callers 1

update_backendMethod · 0.90

Calls 2

get_modelsMethod · 0.80
get_modelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…