From 54bed15585929158edf761fbd2d0dc3f326ec60b Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Sun, 29 Oct 2017 13:07:28 +1100 Subject: [PATCH] In production, move the static and media directories out of the app directory (which puts them in the lemoncurry user's home dir) --- lemoncurry/settings/prod.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lemoncurry/settings/prod.py b/lemoncurry/settings/prod.py index 65d1b62..8871ad8 100644 --- a/lemoncurry/settings/prod.py +++ b/lemoncurry/settings/prod.py @@ -1,7 +1,8 @@ from os import environ +from os.path import join from .base import * -from .base import DATABASES +from .base import BASE_DIR, DATABASES ALLOWED_HOSTS = ['00dani.me'] DEBUG = False @@ -14,6 +15,8 @@ DATABASES['default'] = { 'USER': 'lemoncurry', } +STATIC_ROOT = join(BASE_DIR, '..', 'static') +MEDIA_ROOT = join(BASE_DIR, '..', 'media') STATIC_URL = 'https://cdn.00dani.me/' MEDIA_URL = STATIC_URL + 'media/' META_SITE_DOMAIN = '00dani.me'