Commit 32c6dad5 by Usman Khalid

Moved imports to manage.py and wsgi.py.

parent 75908924
...@@ -15,10 +15,6 @@ def run(): ...@@ -15,10 +15,6 @@ def run():
""" """
Executed during django startup Executed during django startup
""" """
# Patch the xml libs.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
django_utils_translation.patch() django_utils_translation.patch()
autostartup() autostartup()
......
# 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 # Disable PyContract contract checking when running as a webserver
import contracts import contracts
contracts.disable_all() contracts.disable_all()
......
...@@ -20,11 +20,6 @@ def run(): ...@@ -20,11 +20,6 @@ def run():
""" """
Executed during django startup Executed during django startup
""" """
# Patch the xml libs.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
django_utils_translation.patch() django_utils_translation.patch()
autostartup() autostartup()
......
# Patch the xml libs
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
# Disable PyContract contract checking when running as a webserver # Disable PyContract contract checking when running as a webserver
import contracts import contracts
contracts.disable_all() contracts.disable_all()
......
# Patch the xml libs before anything else.
from safe_lxml import defuse_xml_libs
defuse_xml_libs()
import os import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws") 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 ...@@ -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 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 os
import sys import sys
import importlib import importlib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment