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

Method _get_model

haystack/models.py:103–113  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

101 object = property(_get_object, _set_object) # noqa A003
102
103 def _get_model(self):
104 if self._model is None:
105 try:
106 self._model = haystack_get_model(self.app_label, self.model_name)
107 except LookupError:
108 # this changed in change 1.7 to throw an error instead of
109 # returning None when the model isn't found. So catch the
110 # lookup error and keep self._model == None.
111 pass
112
113 return self._model
114
115 def _set_model(self, obj):
116 self._model = obj

Callers

nothing calls this directly

Calls 1

haystack_get_modelFunction · 0.90

Tested by

no test coverage detected