Commit 51a79017 by Calen Pennington

Only set the default etree parser options in the module that is starting the xml parsing

parent f8594570
......@@ -4,14 +4,10 @@
from django.core.management.base import BaseCommand, CommandError
from keystore.django import keystore
from lxml import etree
from keystore.xml import XMLModuleStore
unnamed_modules = 0
etree.set_default_parser(etree.XMLParser(dtd_validation=False, load_dtd=False,
remove_comments=True))
class Command(BaseCommand):
help = \
......
......@@ -12,8 +12,6 @@ from mitxmako.shortcuts import render_to_response, render_to_string
from django_future.csrf import ensure_csrf_cookie
from django.views.decorators.cache import cache_control
from lxml import etree
from module_render import toc_for_course, get_module, get_section
from models import StudentModuleCache
from student.models import UserProfile
......@@ -26,9 +24,6 @@ from courseware import grades
log = logging.getLogger("mitx.courseware")
etree.set_default_parser(etree.XMLParser(dtd_validation=False, load_dtd=False,
remove_comments=True))
template_imports = {'urllib': urllib}
......
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