def handle(self, *args, **options):
        """
        Export the index files
        """
        verbosity = int(options.get('verbosity'))

        # Grab all of the plans from the database
        plan_id = options.get('plan_id')
        plans = [Plan.objects.get(pk=plan_id)] if plan_id else Plan.objects.all()

        # Filter out all non-shared plans if specified
        if options.get("is_shared"):
            plans = [p for p in plans if p.is_shared]
            
        if verbosity > 0:
            self.stdout.write('Exporting %d plan(s) - started at %s\n' % (len(plans), datetime.now()))

        for p in plans:
            if verbosity > 0:
                self.stdout.write('Exporting plan with id: %s and name: %s\n' % (p.id, p.name))
            if options.get('export_type') == 'index':
                # Write each plan to a zipped index file in /tmp
                f = DistrictIndexFile.plan2index(p)
            elif options.get('export_type') == 'shape':
                # Write each plan to a zipped shape file in /tmp
                f = DistrictShapeFile.plan2shape(p)

            if verbosity > 0:
                self.stdout.write('Data stored in file: %s\n' % f.name)

        if verbosity > 0:
            self.stdout.write((datetime.now()) % 'Export finished at %s\n')
dataset/ETHPy150Open PublicMapping/DistrictBuilder/django/publicmapping/redistricting/management/commands/exportplans.py/Command.handle/swapped operands of `%`