movecategories.py 615 B

12345678910111213141516171819
  1. from ... import categories
  2. from ..base import BaseCommand
  3. class Command(BaseCommand):
  4. help = "Moves categories and labels from Misago 0.5 installation"
  5. def handle(self, *args, **options):
  6. self.stdout.write("Moving users from Misago 0.5:")
  7. self.start_timer()
  8. # categories.move_categories(self.stdout, self.style)
  9. self.stdout.write(
  10. self.style.SUCCESS("Moved categories in %s" % self.stop_timer()))
  11. self.start_timer()
  12. categories.move_labels()
  13. self.stdout.write(
  14. self.style.SUCCESS("Moved labels in %s" % self.stop_timer()))