diff --git a/cms/startup.py b/cms/startup.py index 13225f4a49..893cd6a2a8 100644 --- a/cms/startup.py +++ b/cms/startup.py @@ -14,3 +14,19 @@ def run(): Executed during django startup """ autostartup() + + add_mimetypes() + + +def add_mimetypes(): + """ + Add extra mimetypes. Used in xblock_resource. + + If you add a mimetype here, be sure to also add it in lms/startup.py. + """ + import mimetypes + + mimetypes.add_type('application/vnd.ms-fontobject', '.eot') + mimetypes.add_type('application/x-font-opentype', '.otf') + mimetypes.add_type('application/x-font-ttf', '.ttf') + mimetypes.add_type('application/font-woff', '.woff') diff --git a/lms/startup.py b/lms/startup.py index 59de997329..e43e9fddba 100644 --- a/lms/startup.py +++ b/lms/startup.py @@ -35,6 +35,8 @@ def run(): def add_mimetypes(): """ Add extra mimetypes. Used in xblock_resource. + + If you add a mimetype here, be sure to also add it in cms/startup.py. """ import mimetypes