Commit 031ac985 by Alan Boudreault

Add mimetype additions in studio startup

parent 57025cd5
...@@ -14,3 +14,19 @@ def run(): ...@@ -14,3 +14,19 @@ def run():
Executed during django startup Executed during django startup
""" """
autostartup() 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')
...@@ -35,6 +35,8 @@ def run(): ...@@ -35,6 +35,8 @@ def run():
def add_mimetypes(): def add_mimetypes():
""" """
Add extra mimetypes. Used in xblock_resource. 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 import mimetypes
......
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