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
2afec1ce
Commit
2afec1ce
authored
Jul 27, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to select group used in cache manifest
parent
2e6ad39f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
docs/configuration.rst
+10
-0
pipeline/manifest.py
+6
-2
pipeline/packager.py
+3
-0
No files found.
docs/configuration.rst
View file @
2afec1ce
...
...
@@ -79,6 +79,16 @@ Group options
Defaults to ``None``.
``manifest``
............
**Optional**
Indicate if you want this group to appear in your cache manifest.
Defaults to ``True``.
``extra_context``
.................
...
...
pipeline/manifest.py
View file @
2afec1ce
...
...
@@ -15,9 +15,13 @@ class PipelineManifest(Manifest):
def
collect_packages
(
self
):
packages
=
[]
for
package_name
in
self
.
packager
.
packages
[
'css'
]:
packages
.
append
(
self
.
packager
.
package_for
(
'css'
,
package_name
))
package
=
self
.
packager
.
package_for
(
'css'
,
package_name
)
if
package
[
'manifest'
]:
packages
.
append
(
package
)
for
package_name
in
self
.
packager
.
packages
[
'js'
]:
packages
.
append
(
self
.
packager
.
package_for
(
'js'
,
package_name
))
package
=
self
.
packager
.
package_for
(
'js'
,
package_name
)
if
package
[
'manifest'
]:
packages
.
append
(
package
)
return
packages
def
cache
(
self
):
...
...
pipeline/packager.py
View file @
2afec1ce
...
...
@@ -95,12 +95,15 @@ class Packager(object):
packages
[
name
][
'templates'
]
=
[
path
for
path
in
paths
if
path
.
endswith
(
settings
.
PIPELINE_TEMPLATE_EXT
)]
packages
[
name
][
'output'
]
=
config
[
name
][
'output_filename'
]
packages
[
name
][
'context'
]
=
{}
packages
[
name
][
'manifest'
]
=
True
if
'extra_context'
in
config
[
name
]:
packages
[
name
][
'context'
]
=
config
[
name
][
'extra_context'
]
if
'template_name'
in
config
[
name
]:
packages
[
name
][
'template'
]
=
config
[
name
][
'template_name'
]
if
'variant'
in
config
[
name
]:
packages
[
name
][
'variant'
]
=
config
[
name
][
'variant'
]
if
'manifest'
in
config
[
name
]:
packages
[
name
][
'manifest'
]
=
config
[
name
][
'manifest'
]
return
packages
...
...
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