7
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-06-26 08:52:34 +00:00
tutor/config/openedx/universal/lms/development.py

23 lines
845 B
Python
Raw Normal View History

from ..devstack import *
2017-12-26 00:16:35 +00:00
# Load module store settings from config files
2017-12-26 00:16:35 +00:00
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
# Set uploaded media file path
2017-12-26 00:16:35 +00:00
MEDIA_ROOT = "/openedx/data/uploads/"
# Change syslog-based loggers which don't work inside docker containers
LOGGING['handlers']['local'] = LOGGING['handlers']['console'].copy()
LOGGING['handlers']['tracking'] = LOGGING['handlers']['console'].copy()
2017-12-26 00:16:35 +00:00
# Create folders if necessary
import os
2017-12-26 00:16:35 +00:00
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
if not os.path.exists(folder):
os.makedirs(folder)
# Fix media files paths
VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['location'] = MEDIA_ROOT
VIDEO_TRANSCRIPTS_SETTINGS['STORAGE_KWARGS']['location'] = MEDIA_ROOT
PROFILE_IMAGE_BACKEND['options']['location'] = os.path.join(MEDIA_ROOT, 'profile-images/')