Moved imports to manage.py and wsgi.py.

This commit is contained in:
Usman Khalid
2014-09-12 19:51:25 +05:00
parent 75908924ce
commit 32c6dad526
6 changed files with 16 additions and 9 deletions

View File

@@ -15,10 +15,6 @@ def run():
"""
Executed during django startup
"""
# Patch the xml libs.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
django_utils_translation.patch()
autostartup()

View File

@@ -1,3 +1,7 @@
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
# Disable PyContract contract checking when running as a webserver
import contracts
contracts.disable_all()

View File

@@ -20,11 +20,6 @@ def run():
"""
Executed during django startup
"""
# Patch the xml libs.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
django_utils_translation.patch()
autostartup()

View File

@@ -1,3 +1,7 @@
# Patch the xml libs
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
# Disable PyContract contract checking when running as a webserver
import contracts
contracts.disable_all()

View File

@@ -1,3 +1,7 @@
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws")

View File

@@ -11,6 +11,10 @@ by passing the --settings flag, you can specify what environment specific settin
Any arguments not understood by this manage.py will be passed to django-admin.py
"""
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
import os
import sys
import importlib