19 lines
577 B
Python
19 lines
577 B
Python
from django.core.management import BaseCommand
|
|
from books.categorize_modules import categorize_modules, delete_unused_categories, delete_unused_types, uncategorize_modules
|
|
|
|
from books.categorize_modules import create_default_categories
|
|
|
|
|
|
class Command(BaseCommand):
|
|
def handle(self, *args, **options):
|
|
self.stdout.write("Categorizing modules")
|
|
uncategorize_modules()
|
|
create_default_categories()
|
|
categorize_modules()
|
|
delete_unused_types()
|
|
delete_unused_categories()
|
|
|
|
self.stdout.write("Finish categorizing modules")
|
|
|
|
|