From 19b3923533859ff2ea216ec8a2959dca80d9d745 Mon Sep 17 00:00:00 2001 From: Simon Caminada Date: Sun, 1 Apr 2018 15:16:14 +0200 Subject: [PATCH] no message --- src/project/management/__init__.py | 0 src/project/management/commands/__init__.py | 0 src/project/management/commands/update_whoosh.py | 10 ++++++++++ 3 files changed, 10 insertions(+) create mode 100644 src/project/management/__init__.py create mode 100644 src/project/management/commands/__init__.py create mode 100644 src/project/management/commands/update_whoosh.py 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)