From 534b60d4b84b58a0cd024db8a3dea040cb75e6c0 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 10 Feb 2020 23:43:41 +1100 Subject: [PATCH] Print out MEDIA_ROOT directory if in debug mode --- InvenTree/InvenTree/settings.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/settings.py b/InvenTree/InvenTree/settings.py index e5f103f2a9..e7f73fcec6 100644 --- a/InvenTree/InvenTree/settings.py +++ b/InvenTree/InvenTree/settings.py @@ -308,7 +308,10 @@ STATICFILES_DIRS = [ MEDIA_URL = '/media/' # The filesystem location for served static files -MEDIA_ROOT = CONFIG.get('media_root', os.path.join(BASE_DIR, 'media')) +MEDIA_ROOT = os.path.abspath(CONFIG.get('media_root', os.path.join(BASE_DIR, 'media'))) + +if DEBUG: + print("MEDIA_ROOT:", MEDIA_ROOT) # crispy forms use the bootstrap templates CRISPY_TEMPLATE_PACK = 'bootstrap'