From 92b7761c7de880067b6bcd958b84c4fe52891c23 Mon Sep 17 00:00:00 2001 From: Niklas Mohrin Date: Mon, 9 Dec 2024 22:11:49 +0100 Subject: [PATCH] create data dir? --- evap/__main__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/evap/__main__.py b/evap/__main__.py index f7850d6ec..f33754f5e 100755 --- a/evap/__main__.py +++ b/evap/__main__.py @@ -3,11 +3,14 @@ import os import sys +from django.conf import settings from django.core.management import execute_from_command_line def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evap.settings") + if getattr(settings, "DATADIR", None) is not None: + settings.DATADIR.mkdir(exist_ok=True) execute_from_command_line(sys.argv)