@@ -60,10 +60,6 @@ USE_L10N = True
# If you set this to False, Django will not use timezone-aware datetimes.
USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = os.path.join(PACKAGE_ROOT, "site_media", "media")
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
@@ -92,6 +88,15 @@ STATICFILES_FINDERS = [
"compressor.finders.CompressorFinder",
]
try:
_dynamic_storage_root = os.environ['DJANGO_DYNAMIC_STORAGE_ROOT']
except KeyError:
else:
MEDIA_ROOT = os.path.join(_dynamic_storage_root, "user_upload")
COMPRESS_ROOT = _dynamic_storage_root
# Make this unique, and don't share it with anybody.
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', '').strip()
if (not SECRET_KEY) and DEBUG: