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
8fcaec8c
Commit
8fcaec8c
authored
Oct 02, 2012
by
Sjoerd Arendsen
Committed by
Timothée Peignier
Oct 02, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use finders correctly in manifest
parent
d06351e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
pipeline/manifest.py
+21
-5
No files found.
pipeline/manifest.py
View file @
8fcaec8c
import
os
try
:
from
staticfiles.finders
import
DefaultStorageFinder
from
staticfiles.finders
import
get_finders
except
ImportError
:
from
django.contrib.staticfiles.finders
import
DefaultStorageFinder
# noqa
from
django.contrib.staticfiles.finders
import
get_finders
# noqa
from
pipeline.conf
import
settings
...
...
@@ -14,7 +16,8 @@ class PipelineManifest(Manifest):
def
__init__
(
self
):
self
.
packager
=
Packager
()
self
.
packages
=
self
.
collect_packages
()
self
.
finder
=
DefaultStorageFinder
()
self
.
finders
=
get_finders
()
self
.
package_files
=
[]
def
collect_packages
(
self
):
packages
=
[]
...
...
@@ -33,10 +36,23 @@ class PipelineManifest(Manifest):
if
settings
.
PIPELINE
:
for
package
in
self
.
packages
:
self
.
package_files
.
append
(
package
.
output_filename
)
yield
str
(
self
.
packager
.
individual_url
(
package
.
output_filename
))
else
:
for
package
in
self
.
packages
:
for
path
in
self
.
packager
.
compile
(
package
.
paths
):
self
.
package_files
.
append
(
path
)
yield
str
(
self
.
packager
.
individual_url
(
path
))
for
path
,
_
in
self
.
finder
.
list
(
ignore_patterns
):
yield
str
(
self
.
packager
.
individual_url
(
path
))
for
finder
in
self
.
finders
:
for
path
,
storage
in
finder
.
list
(
ignore_patterns
):
# Prefix the relative path if the source storage contains it
if
getattr
(
storage
,
'prefix'
,
None
):
prefixed_path
=
os
.
path
.
join
(
storage
.
prefix
,
path
)
else
:
prefixed_path
=
path
# Dont add any doubles
if
prefixed_path
not
in
self
.
package_files
:
self
.
package_files
.
append
(
prefixed_path
)
yield
str
(
self
.
packager
.
individual_url
(
prefixed_path
))
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