Here is the setup for compressing css files in Pipeline:
PIPELINE_CSS = {
'colors': {
'source_filenames': (
'/static/css/colors/colors.css',
'/static/css/colors/layout.css'
),
'output_filename': '/static/css/Colors.css',
},
}
However, when the client attempts to access
/static/css/Colors.css with
{% load compressed %}
{% compressed_css 'colors' %}
a 404 error is returned, indicating that the file was not found.
No files are generated in STATIC_ROOT even after running the collectstatic
command.
YUI Compressor has been installed from the Synaptic Repository of my Ubuntu Lucid.
EDIT1: Other settings in settings.py:
PIPELINE_STORAGE = 'pipeline.storage.PipelineFinderStorage'
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
PIPELINE=True
In middleware classes:
'django.middleware.gzip.GZipMiddleware',
'pipeline.middleware.MinifyHTMLMiddleware',
STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', # 'django.contrib.staticfiles.finders.DefaultStorageFinder', )
STATICFILES_DIRS = ( "/home/my/eclipse/myproject/static/", )
STATIC_URL = '/static/'
STATIC_ROOT = '/home/my/eclipse/myproject/static2/'