From 3db485d67f3ed023d62bd10fb4d04267770b4109 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Thu, 9 Nov 2023 11:56:33 +0100 Subject: [PATCH] fix media root and url --- app/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/settings.py b/app/settings.py index b5313483..d00b0aa1 100644 --- a/app/settings.py +++ b/app/settings.py @@ -103,7 +103,7 @@ USE_L10N = True # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media/') +MEDIA_ROOT = "/srv/media/" if not os.path.exists(MEDIA_ROOT): os.mkdir(MEDIA_ROOT) @@ -111,7 +111,7 @@ if not os.path.exists(MEDIA_ROOT): # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = 'http://localhost:8040/' +MEDIA_URL = '/media/' # Absolute path to the directory static files should be collected to. # Don't put anything in this directory yourself; store your static files -- 2.39.5