Files
edx-platform/cms/startup.py
Calen Pennington 407b02b358 Centralize startup code, and execute in all contexts
Inspired by: http://eldarion.com/blog/2013/02/14/entry-point-hook-django-projects/
Moves startup code to lms.startup and cms.startup, and calls the startup
methods in wsgi.py and manage.py for both projects.
2013-08-27 12:12:20 -04:00

26 lines
500 B
Python

"""
Module with code executed during Studio startup
"""
from django.conf import settings
# Force settings to run so that the python path is modified
settings.INSTALLED_APPS # pylint: disable=W0104
from django_startup import autostartup
# TODO: Remove this code once Studio/CMS runs via wsgi in all environments
INITIALIZED = False
def run():
"""
Executed during django startup
"""
global INITIALIZED
if INITIALIZED:
return
INITIALIZED = True
autostartup()