diff --git a/src/project/management/__init__.py b/src/project/management/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/project/management/commands/__init__.py b/src/project/management/commands/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/project/management/commands/update_whoosh.py b/src/project/management/commands/update_whoosh.py new file mode 100644 index 0000000..3b2d540 --- /dev/null +++ b/src/project/management/commands/update_whoosh.py @@ -0,0 +1,10 @@ +from django.core.management.base import BaseCommand +import os + + +class Command(BaseCommand): + def handle(self, *args, **options): + directory = './whoosh/index/' + + if not os.path.exists(directory): + os.makedirs(directory)