def handle(self, *args, **options):
        verbosity = options['verbosity']
        num_updated = 0

        for model in plugin_pool.get_model_classes():
            updated = update_model_prefix(model, verbosity=verbosity)
            if updated:
                num_updated += 1

        self.stdout.write(ngettext(u"{count} item updated.", u"{count} items updated.", num_updated).format(count=num_updated) + u" ")
Exemple #2
0
    def handle(self, *args, **options):
        verbosity = options["verbosity"]
        num_updated = 0

        for model in plugin_pool.get_model_classes():
            updated = update_model_prefix(model, verbosity=verbosity)
            if updated:
                num_updated += 1

        self.stdout.write(
            ngettext("{count} item updated.", "{count} items updated.",
                     num_updated).format(count=num_updated) + " ")
Exemple #3
0
 def get_models(self):
     """
     Define which models to include
     """
     # Could also use `apps.get_models()` here.
     return plugin_pool.get_model_classes()
 def get_models(self):
     """
     Define which models to include
     """
     # Could also use `apps.get_models()` here.
     return plugin_pool.get_model_classes()