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:
Calen Pennington
2013-08-14 16:50:34 -04:00
parent 0e4b114278
commit 407b02b358
32 changed files with 170 additions and 174 deletions

View File

@@ -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