def handle(self, **options): self.verbosity = int(options.get("verbosity", 1)) self.batchsize = options.get("batchsize", DEFAULT_BATCH_SIZE) for model, index in site.get_indexes().items(): self.update_by_model(model, index)
def index_meeting(sender, *args, **kwargs): from haystack import site site.get_indexes()[Meeting].update_object(kwargs['instance'])
def index_committee(sender, *args, **kwargs): from haystack import site site.get_indexes()[Committee].update_object(kwargs['instance'])
def handle(self, **options): self.verbosity = int(options.get('verbosity', 1)) self.batchsize = options.get('batchsize', DEFAULT_BATCH_SIZE) for model, index in site.get_indexes().items(): self.update_by_model(model, index)