fixed folders, compatible with previous paperless version

This commit is contained in:
Jonas Winkler
2020-10-29 14:30:15 +01:00
parent 3870ed1f21
commit 46d1fdc108
10 changed files with 27 additions and 23 deletions

View File

@@ -33,7 +33,9 @@ def paths_check(app_configs, **kwargs):
Check the various paths for existence, readability and writeability
"""
check_messages = path_check("PAPERLESS_DATA_DIR") +\
check_messages = path_check("PAPERLESS_DATA_DIR") + \
path_check("PAPERLESS_MEDIA_ROOT") + \
path_check("PAPERLESS_CONSUMPTION_DIR") + \
path_check("PAPERLESS_STATICDIR")
return check_messages

View File

@@ -39,11 +39,11 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DATA_DIR = os.getenv('PAPERLESS_DATA_DIR', os.path.join(BASE_DIR, "..", "data"))
MEDIA_ROOT = os.path.join(DATA_DIR, "media")
MEDIA_ROOT = os.getenv('PAPERLESS_MEDIA_ROOT', os.path.join(BASE_DIR, "..", "media"))
INDEX_DIR = os.path.join(DATA_DIR, "index")
ORIGINALS_DIR = os.path.join(MEDIA_ROOT, "documents")
THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "thumbnails")
ORIGINALS_DIR = os.path.join(MEDIA_ROOT, "documents", "originals")
THUMBNAIL_DIR = os.path.join(MEDIA_ROOT, "documents", "thumbnails")
MODEL_FILE = os.path.join(DATA_DIR, "classification_model.pickle")
# Quick-start development settings - unsuitable for production