In production, move the static and media directories out of the app directory (which puts them in the lemoncurry user's home dir)

This commit is contained in:
Danielle McLean 2017-10-29 13:07:28 +11:00
parent 7027c74035
commit 54bed15585
Signed by untrusted user: 00dani
GPG key ID: 5A5D2D1AFF12EEC5

View file

@ -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'