1 from django.core.management.base import BaseCommand
3 class Command(BaseCommand):
4 help = 'Reindex everything.'
7 def handle(self, *args, **opts):
8 from catalogue.models import Book
10 idx = search.ReusableIndex()
12 for b in Book.objects.all():
14 idx.index_book(b, None)
15 print 'Reindexing tags.'