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
3ff878ca
Commit
3ff878ca
authored
Jan 21, 2013
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stop using weird PIPELINE settings
parent
e1a6beaf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
6 deletions
+7
-6
pipeline/compilers/__init__.py
+1
-1
pipeline/conf/settings.py
+2
-1
pipeline/jinja2/ext.py
+1
-1
pipeline/manifest.py
+1
-1
pipeline/templatetags/compressed.py
+2
-2
No files found.
pipeline/compilers/__init__.py
View file @
3ff878ca
...
...
@@ -39,7 +39,7 @@ class Compiler(object):
outdated
=
self
.
is_outdated
(
input_path
,
output_path
)
compiler
.
compile_file
(
infile
,
outfile
,
outdated
=
outdated
,
force
=
force
)
except
CompilerError
:
if
not
self
.
storage
.
exists
(
output_path
)
or
not
settings
.
PIPELINE
:
if
not
self
.
storage
.
exists
(
output_path
)
or
settings
.
DEBUG
:
raise
return
paths
...
...
pipeline/conf/settings.py
View file @
3ff878ca
...
...
@@ -2,7 +2,8 @@ from __future__ import unicode_literals
from
django.conf
import
settings
PIPELINE
=
getattr
(
settings
,
'PIPELINE'
,
not
settings
.
DEBUG
)
DEBUG
=
getattr
(
settings
,
'DEBUG'
,
False
)
PIPELINE_ROOT
=
getattr
(
settings
,
'PIPELINE_ROOT'
,
settings
.
STATIC_ROOT
)
PIPELINE_URL
=
getattr
(
settings
,
'PIPELINE_URL'
,
settings
.
STATIC_URL
)
...
...
pipeline/jinja2/ext.py
View file @
3ff878ca
...
...
@@ -66,7 +66,7 @@ class Jinja2Compressed(object):
"""Render the HTML Snippet"""
self
.
get_package
(
name
)
if
self
.
package
:
if
settings
.
PIPELINE
:
if
not
settings
.
DEBUG
:
return
self
.
render
(
self
.
package
.
output_filename
)
else
:
paths
=
self
.
packager
.
compile
(
self
.
package
.
paths
)
...
...
pipeline/manifest.py
View file @
3ff878ca
...
...
@@ -33,7 +33,7 @@ class PipelineManifest(Manifest):
def
cache
(
self
):
ignore_patterns
=
getattr
(
settings
,
"STATICFILES_IGNORE_PATTERNS"
,
None
)
if
settings
.
PIPELINE
:
if
not
settings
.
DEBUG
:
for
package
in
self
.
packages
:
self
.
package_files
.
append
(
package
.
output_filename
)
yield
str
(
self
.
packager
.
individual_url
(
package
.
output_filename
))
...
...
pipeline/templatetags/compressed.py
View file @
3ff878ca
...
...
@@ -28,7 +28,7 @@ class CompressedCSSNode(template.Node):
except
PackageNotFound
:
return
''
# fail silently, do not return anything if an invalid group is specified
if
settings
.
PIPELINE
:
if
not
settings
.
DEBUG
:
return
self
.
render_css
(
package
,
package
.
output_filename
)
else
:
paths
=
self
.
packager
.
compile
(
package
.
paths
)
...
...
@@ -64,7 +64,7 @@ class CompressedJSNode(template.Node):
except
PackageNotFound
:
return
''
# fail silently, do not return anything if an invalid group is specified
if
settings
.
PIPELINE
:
if
not
settings
.
DEBUG
:
return
self
.
render_js
(
package
,
package
.
output_filename
)
else
:
paths
=
self
.
packager
.
compile
(
package
.
paths
)
...
...
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