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
6bc0922b
Commit
6bc0922b
authored
Aug 19, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add a way to compress a specified group with synccompress. close #8
parent
313621c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
pipeline/management/commands/synccompress.py
+9
-5
No files found.
pipeline/management/commands/synccompress.py
View file @
6bc0922b
from
optparse
import
make_option
from
optparse
import
make_option
from
django.core.management.base
import
NoArgs
Command
from
django.core.management.base
import
Base
Command
class
Command
(
NoArgs
Command
):
class
Command
(
Base
Command
):
option_list
=
NoArgs
Command
.
option_list
+
(
option_list
=
Base
Command
.
option_list
+
(
make_option
(
'--force'
,
make_option
(
'--force'
,
action
=
'store_true'
,
action
=
'store_true'
,
default
=
False
,
default
=
False
,
...
@@ -12,9 +12,9 @@ class Command(NoArgsCommand):
...
@@ -12,9 +12,9 @@ class Command(NoArgsCommand):
),
),
)
)
help
=
'Updates and compresses CSS and JS on-demand, without restarting Django'
help
=
'Updates and compresses CSS and JS on-demand, without restarting Django'
args
=
''
args
=
'
<group>
'
def
handle
_noargs
(
self
,
**
options
):
def
handle
(
self
,
group
=
None
,
**
options
):
from
pipeline.packager
import
Packager
from
pipeline.packager
import
Packager
packager
=
Packager
(
packager
=
Packager
(
sync
=
True
,
sync
=
True
,
...
@@ -23,6 +23,8 @@ class Command(NoArgsCommand):
...
@@ -23,6 +23,8 @@ class Command(NoArgsCommand):
)
)
for
package_name
in
packager
.
packages
[
'css'
]:
for
package_name
in
packager
.
packages
[
'css'
]:
if
group
and
package_name
!=
group
:
continue
package
=
packager
.
package_for
(
'css'
,
package_name
)
package
=
packager
.
package_for
(
'css'
,
package_name
)
if
packager
.
verbose
or
packager
.
force
:
if
packager
.
verbose
or
packager
.
force
:
print
print
...
@@ -32,6 +34,8 @@ class Command(NoArgsCommand):
...
@@ -32,6 +34,8 @@ class Command(NoArgsCommand):
packager
.
pack_stylesheets
(
package
)
packager
.
pack_stylesheets
(
package
)
for
package_name
in
packager
.
packages
[
'js'
]:
for
package_name
in
packager
.
packages
[
'js'
]:
if
group
and
package_name
!=
group
:
continue
package
=
packager
.
package_for
(
'js'
,
package_name
)
package
=
packager
.
package_for
(
'js'
,
package_name
)
if
packager
.
verbose
or
packager
.
force
:
if
packager
.
verbose
or
packager
.
force
:
print
print
...
...
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