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.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from django.conf import settings
|
||||
from django.conf.urls import patterns, include, url
|
||||
|
||||
# Import this file so it can do its work, even though we don't use the name.
|
||||
# pylint: disable=W0611
|
||||
from . import one_time_startup
|
||||
# TODO: This should be removed once the CMS is running via wsgi on all production servers
|
||||
import cms.startup as startup
|
||||
startup.run()
|
||||
|
||||
# There is a course creators admin table.
|
||||
from ratelimitbackend import admin
|
||||
|
||||
Reference in New Issue
Block a user