File: installation.rst

package info (click to toggle)
django-pipeline 4.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 904 kB
  • sloc: python: 3,170; makefile: 120; javascript: 59
file content (81 lines) | stat: -rw-r--r-- 2,177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
.. _ref-installation:

============
Installation
============

1. Either check out Pipeline from GitHub_ or to pull a release off PyPI_ ::

       pip install django-pipeline


2. Add 'pipeline' to your ``INSTALLED_APPS`` ::

       INSTALLED_APPS = (
           'pipeline',
       )

3. Use a pipeline storage for ``STATICFILES_STORAGE`` ::

        STATICFILES_STORAGE = 'pipeline.storage.PipelineManifestStorage'

4. Add the ``PipelineFinder`` to ``STATICFILES_FINDERS`` ::

        STATICFILES_FINDERS = (
            'django.contrib.staticfiles.finders.FileSystemFinder',
            'django.contrib.staticfiles.finders.AppDirectoriesFinder',
            'pipeline.finders.PipelineFinder',
        )


.. note::
  You need to use ``Django>=1.11`` to be able to use this version of pipeline.

.. _GitHub: http://github.com/jazzband/django-pipeline
.. _PyPI: http://pypi.python.org/pypi/django-pipeline

Upgrading from 1.3
==================

To upgrade from pipeline 1.3, you will need to follow these steps:

1. Update templates to use the new syntax

    .. code-block:: python

        {# pipeline<1.4 #}
        {% load compressed %}
        {% compressed_js 'group' %}
        {% compressed_css 'group' %}

    .. code-block:: python

        {# pipeline>=1.4 #}
        {% load pipeline %}
        {% javascript 'group' %}
        {% stylesheet 'group' %}

2. Add the ``PipelineFinder`` to ``STATICFILES_FINDERS`` ::

        STATICFILES_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 :ref:`ref-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.