mirror of
https://github.com/pretix/pretix.git
synced 2026-08-09 10:37:50 +00:00
Fix data directory settings
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
---------------
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user