load MEDIA_ROOT AND STATIC_ROOT from .env

This commit is contained in:
j3d1 2023-11-18 21:11:47 +01:00
parent a340154cd9
commit f2720e4fb2

View file

@ -142,10 +142,10 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.2/howto/static-files/ # https://docs.djangoproject.com/en/4.2/howto/static-files/
STATIC_ROOT = 'staticfiles' STATIC_ROOT = os.getenv('STATIC_ROOT')
STATIC_URL = '/static/' STATIC_URL = '/static/'
MEDIA_ROOT = 'userfiles' MEDIA_ROOT = os.getenv('MEDIA_ROOT')
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
STORAGES = { STORAGES = {