From e1ffc539580786eb517d9b9ed2b6481066d99241 Mon Sep 17 00:00:00 2001 From: mipel Date: Fri, 17 Sep 2021 11:10:36 +0200 Subject: [PATCH] Minor settings reorganizing * reorganizes some settings position in konova/settings.py --- konova/settings.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/konova/settings.py b/konova/settings.py index 97cb9919..3ed751a7 100644 --- a/konova/settings.py +++ b/konova/settings.py @@ -14,8 +14,19 @@ from django.utils.translation import gettext_lazy as _ # Load other settings from konova.sub_settings.django_settings import * -# Num of days if user enables Remember-me on login -KEEP_LOGGED_DURATION = 30 +# ALLOWED FILE UPLOAD DEFINITIONS +# Default: Upload into upper folder of code +MEDIA_ROOT = BASE_DIR + "/.." + +# DOCUMENT UPLOAD PATHS +# Extends MEDIA_ROOT (https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-MEDIA_ROOT) +## {} is a placeholder for the object's uuid --> each object will have it's own folder +BASE_DOC_PATH = "konova_uploaded_files/" +INTERVENTION_DOC_PATH = BASE_DOC_PATH + "interventions/{}/" +INTERVENTION_REVOCATION_DOC_PATH = BASE_DOC_PATH + "interventions/{}/revocation/" +COMPENSATION_DOC_PATH = BASE_DOC_PATH + "compensations/{}/" +ECO_ACCOUNT_DOC_PATH = BASE_DOC_PATH + "eco_account/{}/" +EMA_DOC_PATH = BASE_DOC_PATH + "ema/{}/" # German DateTime string format STRF_DATE_TIME = "%d.%m.%Y %H:%M:%S" @@ -58,17 +69,3 @@ ETS_GROUP = "Conservation office" # Needed to redirect to LANIS ## Values to be inserted are [zoom_level, x_coord, y_coord] LANIS_LINK_TEMPLATE = "https://geodaten.naturschutz.rlp.de/kartendienste_naturschutz/index.php?lang=de&zl={}&x={}&y={}&bl=tk_rlp_tms_grau&bo=1&lo=0.8,0.8,0.8,0.6,0.8,0.8,0.8,0.8,0.8&layers=eiv_f,eiv_l,eiv_p,kom_f,kom_l,kom_p,oek_f,ema_f,mae&service=kartendienste_naturschutz" - -# ALLOWED FILE UPLOAD DEFINITIONS -# Default: Upload into upper project folder -MEDIA_ROOT = BASE_DIR + "/.." - -# DOCUMENT UPLOAD PATHS -# Extends MEDIA_ROOT -## {} is a placeholder for the object's uuid --> each object will have it's own folder -BASE_DOC_PATH = "konova_uploaded_files/" -INTERVENTION_DOC_PATH = BASE_DOC_PATH + "interventions/{}/" -INTERVENTION_REVOCATION_DOC_PATH = BASE_DOC_PATH + "interventions/{}/revocation/" -COMPENSATION_DOC_PATH = BASE_DOC_PATH + "compensations/{}/" -ECO_ACCOUNT_DOC_PATH = BASE_DOC_PATH + "eco_account/{}/" -EMA_DOC_PATH = BASE_DOC_PATH + "ema/{}/" \ No newline at end of file