Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
5d39be50
Commit
5d39be50
authored
May 02, 2012
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mimetype mess. close #103
parent
cd13e653
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
pipeline/conf/settings.py
+1
-0
pipeline/utils.py
+2
-2
No files found.
pipeline/conf/settings.py
View file @
5d39be50
...
@@ -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
:
...
...
pipeline/utils.py
View file @
5d39be50
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment