Commit 3ff878ca by Timothée Peignier

stop using weird PIPELINE settings

parent e1a6beaf
...@@ -39,7 +39,7 @@ class Compiler(object): ...@@ -39,7 +39,7 @@ class Compiler(object):
outdated = self.is_outdated(input_path, output_path) outdated = self.is_outdated(input_path, output_path)
compiler.compile_file(infile, outfile, outdated=outdated, force=force) compiler.compile_file(infile, outfile, outdated=outdated, force=force)
except CompilerError: except CompilerError:
if not self.storage.exists(output_path) or not settings.PIPELINE: if not self.storage.exists(output_path) or settings.DEBUG:
raise raise
return paths return paths
......
...@@ -2,7 +2,8 @@ from __future__ import unicode_literals ...@@ -2,7 +2,8 @@ from __future__ import unicode_literals
from django.conf import settings 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_ROOT = getattr(settings, 'PIPELINE_ROOT', settings.STATIC_ROOT)
PIPELINE_URL = getattr(settings, 'PIPELINE_URL', settings.STATIC_URL) PIPELINE_URL = getattr(settings, 'PIPELINE_URL', settings.STATIC_URL)
......
...@@ -66,7 +66,7 @@ class Jinja2Compressed(object): ...@@ -66,7 +66,7 @@ class Jinja2Compressed(object):
"""Render the HTML Snippet""" """Render the HTML Snippet"""
self.get_package(name) self.get_package(name)
if self.package: if self.package:
if settings.PIPELINE: if not settings.DEBUG:
return self.render(self.package.output_filename) return self.render(self.package.output_filename)
else: else:
paths = self.packager.compile(self.package.paths) paths = self.packager.compile(self.package.paths)
......
...@@ -33,7 +33,7 @@ class PipelineManifest(Manifest): ...@@ -33,7 +33,7 @@ class PipelineManifest(Manifest):
def cache(self): def cache(self):
ignore_patterns = getattr(settings, "STATICFILES_IGNORE_PATTERNS", None) ignore_patterns = getattr(settings, "STATICFILES_IGNORE_PATTERNS", None)
if settings.PIPELINE: if not settings.DEBUG:
for package in self.packages: for package in self.packages:
self.package_files.append(package.output_filename) self.package_files.append(package.output_filename)
yield str(self.packager.individual_url(package.output_filename)) yield str(self.packager.individual_url(package.output_filename))
......
...@@ -28,7 +28,7 @@ class CompressedCSSNode(template.Node): ...@@ -28,7 +28,7 @@ class CompressedCSSNode(template.Node):
except PackageNotFound: except PackageNotFound:
return '' # fail silently, do not return anything if an invalid group is specified 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) return self.render_css(package, package.output_filename)
else: else:
paths = self.packager.compile(package.paths) paths = self.packager.compile(package.paths)
...@@ -64,7 +64,7 @@ class CompressedJSNode(template.Node): ...@@ -64,7 +64,7 @@ class CompressedJSNode(template.Node):
except PackageNotFound: except PackageNotFound:
return '' # fail silently, do not return anything if an invalid group is specified 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) return self.render_js(package, package.output_filename)
else: else:
paths = self.packager.compile(package.paths) 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