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.
17 lines
324 B
Python
17 lines
324 B
Python
"""
|
|
Module for code that should run during LMS 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
|
|
|
|
|
|
def run():
|
|
"""
|
|
Executed during django startup
|
|
"""
|
|
autostartup()
|