MCPcopy Create free account
hub / github.com/django-haystack/django-haystack / remove_object

Method remove_object

haystack/indexes.py:326–338  ·  view source on GitHub ↗

Remove an object from the index. Attached to the class's post-delete hook. If ``using`` is provided, it specifies which connection should be used. Default relies on the routers to decide which backend should be used.

(self, instance, using=None, **kwargs)

Source from the content-addressed store, hash-verified

324 backend.update(self, [instance])
325
326 def remove_object(self, instance, using=None, **kwargs):
327 """
328 Remove an object from the index. Attached to the class's
329 post-delete hook.
330
331 If ``using`` is provided, it specifies which connection should be
332 used. Default relies on the routers to decide which backend should
333 be used.
334 """
335 backend = self.get_backend(using)
336
337 if backend is not None:
338 backend.remove(instance, **kwargs)
339
340 def clear(self, using=None):
341 """

Callers 1

handle_deleteMethod · 0.45

Calls 2

get_backendMethod · 0.95
removeMethod · 0.45

Tested by

no test coverage detected