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
d892b009
Commit
d892b009
authored
Jun 13, 2012
by
pierre.drescher@gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed setting to specify embed asset path instead of override
parent
a358bf47
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
docs/configuration.rst
+4
-4
pipeline/compressors/__init__.py
+1
-3
pipeline/conf/settings.py
+1
-1
No files found.
docs/configuration.rst
View file @
d892b009
...
...
@@ -195,15 +195,15 @@ You can override these rules using the following settings:
Setting that controls the maximum image size (in bytes) to embed in CSS using Data-URIs.
Internet Explorer 8 has issues with assets under 32 kilobytes.
Defaults to ``32700``
``PIPELINE_EMBED_
ALL_IMAGES
``
``PIPELINE_EMBED_
PATH
``
..........................
Setting that controls whether or not an asset needs to be in a directory named "**embed**" in
order to be embedded.
Setting the directory that an asset needs to be in so that it is embedded
Defaults to ``
False
``
Defaults to ``
r'[/]?embed/'
``
Rewriting CSS urls
...
...
pipeline/compressors/__init__.py
View file @
d892b009
...
...
@@ -16,7 +16,6 @@ from pipeline.conf import settings
from
pipeline.utils
import
to_class
,
relpath
from
pipeline.storage
import
default_storage
EMBEDDABLE
=
r'[/]?embed/'
URL_DETECTOR
=
r'url\([\'"]?([^\s)]+\.[a-z]+[\?\#\d\w]*)[\'"]?\)'
URL_REPLACER
=
r'url\(__EMBED__(.+?)(\?\d+)?\)'
...
...
@@ -158,8 +157,7 @@ class Compressor(object):
if
not
variant
:
return
False
if
not
((
settings
.
PIPELINE_EMBED_ALL_IMAGES
or
re
.
search
(
EMBEDDABLE
,
path
))
and
\
self
.
storage
.
exists
(
path
)):
if
not
(
re
.
search
(
settings
.
PIPELINE_EMBED_PATH
,
path
)
and
self
.
storage
.
exists
(
path
)):
return
False
if
not
ext
in
EMBED_EXTS
:
return
False
...
...
pipeline/conf/settings.py
View file @
d892b009
...
...
@@ -56,7 +56,7 @@ PIPELINE_MIMETYPES = getattr(settings, 'PIPELINE_MIMETYPES', (
))
PIPELINE_EMBED_MAX_IMAGE_SIZE
=
getattr
(
settings
,
'PIPELINE_EMBED_MAX_IMAGE_SIZE'
,
32700
)
PIPELINE_EMBED_
ALL_IMAGES
=
getattr
(
settings
,
'PIPELINE_EMBED_ALL_IMAGES'
,
False
)
PIPELINE_EMBED_
PATH
=
getattr
(
settings
,
'PIPELINE_EMBED_PATH'
,
r'[/]?embed/'
)
if
PIPELINE_COMPILERS
is
None
:
PIPELINE_COMPILERS
=
[]
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