Moved imports to manage.py and wsgi.py.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user