aboutsummaryrefslogtreecommitdiff
path: root/settings_production.py
diff options
context:
space:
mode:
authorBen Copeland <ben.copeland@linaro.org>2016-01-26 17:15:23 +0000
committerBen Copeland <ben.copeland@linaro.org>2016-01-27 15:39:15 +0000
commitc7137f6c58d8417fe8cdd093529af25bad89fb05 (patch)
tree47b2a80a4d0b13208dfdd88d9bb8bfae84695004 /settings_production.py
parent331501bea85e65f508a15c5b13908f32d29a216f (diff)
django-uploads: update the settings file to use the new location
Using /mnt is not a good place for storing our uploads, due to space limitations. Instead, lets use /srv Change-Id: Ibeea68bf4badab0950d3315c00ce9a0f43510a57 Reviewed-on: https://review.linaro.org/10139 Reviewed-by: Andy Doan <andy.doan+gerrit@linaro.org> Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Diffstat (limited to 'settings_production.py')
-rw-r--r--settings_production.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/settings_production.py b/settings_production.py
index 8f1e9a5..83acc3f 100644
--- a/settings_production.py
+++ b/settings_production.py
@@ -18,7 +18,7 @@ ALLOWED_HOSTS = [os.environ.get('HOST_NAME', 'localhost')]
SERVED_PATHS = [os.path.join(DEPLOYMENT_DIR, 'www')]
UPLOAD_PATH = os.path.join(DEPLOYMENT_DIR, 'uploads')
-FILE_UPLOAD_TEMP_DIR = '/mnt/django-uploads'
+FILE_UPLOAD_TEMP_DIR = '/srv/django-uploads'
IP2LOCATION_FILE = os.path.join(
DEPLOYMENT_DIR, 'IP-COUNTRY-REGION-CITY-ISP.BIN')
@@ -34,3 +34,7 @@ if os.path.exists(os.path.join(DEPLOYMENT_DIR, 'header_override.html')):
# allow site specific overrides for secrets
if os.path.exists(os.path.join(DEPLOYMENT_DIR, 'secrets.py')):
execfile(os.path.join(DEPLOYMENT_DIR, 'secrets.py'))
+
+# make sure django directory exists
+if not os.path.isdir(FILE_UPLOAD_TEMP_DIR):
+ raise RuntimeError('Missing Django upload dir')