Add mimetype additions in studio startup

This commit is contained in:
Alan Boudreault
2014-05-29 11:44:14 -04:00
parent 57025cd5e6
commit 031ac9852e
2 changed files with 18 additions and 0 deletions

View File

@@ -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')

View File

@@ -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