Commit 3ff878ca by Timothée Peignier

stop using weird PIPELINE settings

parent e1a6beaf
......@@ -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
......
......@@ -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)
......
......@@ -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)
......
......@@ -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))
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment