MCPcopy
hub / github.com/django/django / bulk_update

Method bulk_update

django/db/migrations/state.py:666–675  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

664
665 @contextmanager
666 def bulk_update(self):
667 # Avoid clearing each model's cache for each change. Instead, clear
668 # all caches when we're finished updating the model instances.
669 ready = self.ready
670 self.ready = False
671 try:
672 yield
673 finally:
674 self.ready = ready
675 self.clear_cache()
676
677 def render_multiple(self, model_states):
678 # We keep trying to render the models in a loop, ignoring invalid

Callers 2

render_multipleMethod · 0.95
_reloadMethod · 0.45

Calls 1

clear_cacheMethod · 0.45

Tested by

no test coverage detected