Fix data directory settings

This commit is contained in:
Raphael Michel
2015-06-03 00:29:36 +02:00
parent 8430da34ca
commit f68132f006
3 changed files with 5 additions and 5 deletions
@@ -1,7 +1,7 @@
#!/bin/bash
cd /pretix/src
export DJANGO_SETTINGS_MODULE=pretix.settings
export MEDIA_ROOT=/data/
export DATA_DIR=/data/
python3 manage.py migrate
python3 manage.py compress
gunicorn \
+1 -1
View File
@@ -52,7 +52,7 @@ Example::
``datadir``
The local path to a data directory that will be used for storing user uploads and similar
data.
data. Defaults to the value of the environment variable ``DATA_DIR`` or ``data``.
Locale settings
---------------
+3 -3
View File
@@ -7,7 +7,7 @@ config.read(['/etc/pretix/pretix.cfg', os.path.expanduser('~/.pretix.cfg'), 'pre
encoding='utf-8')
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATA_DIR = config.get('pretix', 'datadir', fallback='data')
DATA_DIR = config.get('pretix', 'datadir', fallback=os.environ.get('DATA_DIR', 'data'))
if not os.path.exists(DATA_DIR):
os.mkdir(DATA_DIR)
@@ -40,9 +40,9 @@ DATABASES = {
}
}
STATIC_URL = config.get('static', 'url', fallback='/static/')
STATIC_URL = config.get('urls', 'static', fallback='/static/')
MEDIA_URL = config.get('media', 'url', fallback=os.environ.get('MEDIA_ROOT', '/media/'))
MEDIA_URL = config.get('urls', 'media', fallback='/media/')
PRETIX_INSTANCE_NAME = config.get('pretix', 'instance_name', fallback='pretix.de')
PRETIX_GLOBAL_REGISTRATION = config.getboolean('pretix', 'global_registration', fallback=True)