Commit 5d39be50 by Timothée Peignier

fix mimetype mess. close #103

parent cd13e653
...@@ -53,6 +53,7 @@ PIPELINE_LESS_ARGUMENTS = getattr(settings, 'PIPELINE_LESS_ARGUMENTS', '') ...@@ -53,6 +53,7 @@ PIPELINE_LESS_ARGUMENTS = getattr(settings, 'PIPELINE_LESS_ARGUMENTS', '')
PIPELINE_MIMETYPES = getattr(settings, 'PIPELINE_MIMETYPES', ( PIPELINE_MIMETYPES = getattr(settings, 'PIPELINE_MIMETYPES', (
('text/coffeescript', '.coffee'), ('text/coffeescript', '.coffee'),
('text/less', '.less'), ('text/less', '.less'),
('text/javascript', '.js')
)) ))
if PIPELINE_COMPILERS is None: if PIPELINE_COMPILERS is None:
......
...@@ -27,8 +27,8 @@ def filepath_to_uri(path): ...@@ -27,8 +27,8 @@ def filepath_to_uri(path):
def guess_type(path, default=None): def guess_type(path, default=None):
for type, ext in settings.PIPELINE_MIMETYPES: for type, ext in settings.PIPELINE_MIMETYPES:
mimetypes.add_type(type, ext, strict=False) mimetypes.add_type(type, ext)
mimetype, _ = mimetypes.guess_type(path, strict=False) mimetype, _ = mimetypes.guess_type(path)
if not mimetype: if not mimetype:
return default return default
return mimetype return mimetype
......
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