Installation¶
Either check out Pipeline from GitHub or to pull a release off PyPI
pip install django-pipeline
Add ‘pipeline’ to your
INSTALLED_APPSINSTALLED_APPS = ( 'pipeline', )
Use a pipeline storage for
STATICFILES_STORAGESTATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
Add the
PipelineFindertoSTATICFILES_FINDERSSTATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'pipeline.finders.PipelineFinder', )
Note
You need to use Django>=1.7 to be able to use this version of pipeline.
Upgrading from 1.3¶
To upgrade from pipeline 1.3, you will need to follow these steps:
Update templates to use the new syntax
{# pipeline<1.4 #} {% load compressed %} {% compressed_js 'group' %} {% compressed_css 'group' %}
{# pipeline>=1.4 #} {% load pipeline %} {% javascript 'group' %} {% stylesheet 'group' %}
Add the
PipelineFindertoSTATICFILES_FINDERSSTATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'pipeline.finders.PipelineFinder', )
Upgrading from 1.5¶
To upgrade from pipeline 1.5, you will need update all your PIPELINE_*
settings and move them under the new PIPELINE setting.
See Configuration.
Recommendations¶
Pipeline’s default CSS and JS compressor is Yuglify. Yuglify wraps UglifyJS and cssmin, applying the default YUI configurations to them. It can be downloaded from: https://github.com/yui/yuglify/.
If you do not install yuglify, make sure to disable the compressor in your settings.