Commit bb9cfdc6 by Timothée Peignier

remove mention of PIPELINE_URL

parent 440f9adb
...@@ -148,8 +148,7 @@ class Compressor(object): ...@@ -148,8 +148,7 @@ class Compressor(object):
return asset_path return asset_path
if not os.path.isabs(asset_path): if not os.path.isabs(asset_path):
asset_path = self.relative_path(public_path) asset_path = self.relative_path(public_path)
asset_url = asset_path.replace(os.sep, '/') return asset_path[1:]
return settings.PIPELINE_URL + asset_url[1:]
def embeddable(self, path, variant): def embeddable(self, path, variant):
"""Is the asset embeddable ?""" """Is the asset embeddable ?"""
......
...@@ -4,7 +4,6 @@ from django.core.exceptions import ImproperlyConfigured ...@@ -4,7 +4,6 @@ from django.core.exceptions import ImproperlyConfigured
PIPELINE = getattr(settings, 'PIPELINE', not settings.DEBUG) PIPELINE = getattr(settings, 'PIPELINE', not settings.DEBUG)
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_STORAGE = getattr(settings, 'PIPELINE_STORAGE', PIPELINE_STORAGE = getattr(settings, 'PIPELINE_STORAGE',
'pipeline.storage.PipelineFinderStorage') 'pipeline.storage.PipelineFinderStorage')
...@@ -51,7 +50,3 @@ PIPELINE_LESS_ARGUMENTS = getattr(settings, 'PIPELINE_LESS_ARGUMENTS', '') ...@@ -51,7 +50,3 @@ PIPELINE_LESS_ARGUMENTS = getattr(settings, 'PIPELINE_LESS_ARGUMENTS', '')
if PIPELINE_COMPILERS is None: if PIPELINE_COMPILERS is None:
PIPELINE_COMPILERS = [] PIPELINE_COMPILERS = []
if not PIPELINE_URL:
raise ImproperlyConfigured("You're using the pipeline app "
"without having set the required STATIC_URL setting.")
...@@ -36,7 +36,6 @@ STATICFILES_FINDERS = ( ...@@ -36,7 +36,6 @@ STATICFILES_FINDERS = (
) )
PIPELINE_ROOT = local_path('assets/') PIPELINE_ROOT = local_path('assets/')
PIPELINE_URL = STATIC_URL
PIPELINE_TEMPLATE_EXT = ".jst" PIPELINE_TEMPLATE_EXT = ".jst"
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
......
...@@ -13,9 +13,7 @@ from pipeline.compressors.yui import YUICompressor ...@@ -13,9 +13,7 @@ from pipeline.compressors.yui import YUICompressor
class CompressorTest(TestCase): class CompressorTest(TestCase):
def setUp(self): def setUp(self):
self.compressor = Compressor() self.compressor = Compressor()
self.old_pipeline_url = settings.PIPELINE_URL
self.old_pipeline_root = settings.PIPELINE_ROOT self.old_pipeline_root = settings.PIPELINE_ROOT
settings.PIPELINE_URL = 'http://localhost/static/'
def test_js_compressor_class(self): def test_js_compressor_class(self):
self.assertEquals(self.compressor.js_compressor, YUICompressor) self.assertEquals(self.compressor.js_compressor, YUICompressor)
...@@ -131,5 +129,4 @@ class CompressorTest(TestCase): ...@@ -131,5 +129,4 @@ class CompressorTest(TestCase):
}""", output) }""", output)
def tearDown(self): def tearDown(self):
settings.PIPELINE_URL = self.old_pipeline_url
settings.PIPELINE_ROOT = self.old_pipeline_root settings.PIPELINE_ROOT = self.old_pipeline_root
...@@ -7,10 +7,6 @@ from pipeline.packager import Packager, PackageNotFound ...@@ -7,10 +7,6 @@ from pipeline.packager import Packager, PackageNotFound
class PackagerTest(TestCase): class PackagerTest(TestCase):
def setUp(self):
self.old_pipeline_url = settings.PIPELINE_URL
settings.PIPELINE_URL = 'http://localhost/static/'
def test_package_for(self): def test_package_for(self):
packager = Packager() packager = Packager()
packager.packages['js'] = packager.create_packages({ packager.packages['js'] = packager.create_packages({
...@@ -69,6 +65,3 @@ class PackagerTest(TestCase): ...@@ -69,6 +65,3 @@ class PackagerTest(TestCase):
individual_url = packager.individual_url(filename) individual_url = packager.individual_url(filename)
self.assertEqual(individual_url, self.assertEqual(individual_url,
"http://localhost/static/js/application.js") "http://localhost/static/js/application.js")
def tearDown(self):
settings.PIPELINE_URL = self.old_pipeline_url
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