Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-pipeline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
django-pipeline
Commits
0fee8967
Commit
0fee8967
authored
Dec 22, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve docs
parent
58424a1c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
29 deletions
+34
-29
docs/conf.py
+1
-0
docs/configuration.rst
+11
-14
docs/storages.rst
+8
-12
docs/usage.rst
+14
-3
No files found.
docs/conf.py
View file @
0fee8967
...
...
@@ -92,6 +92,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme
=
'default'
html_style
=
'rtd.css'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
...
...
docs/configuration.rst
View file @
0fee8967
...
...
@@ -17,14 +17,13 @@ syntax to select multiples files.
The basic syntax for specifying CSS/JavaScript groups files is ::
PIPELINE_CSS = {
'
group_one
': {
'
colors
': {
'source_filenames': (
'css/style.css',
'css/foo.css',
'css/button/*.css',
'css/bar.css'
'css/core.css',
'css/colors/*.css',
'css/layers.css'
),
'output_filename': 'css/
one_compressed
.css',
'output_filename': 'css/
colors
.css',
'extra_context': {
'media': 'screen,projection',
},
...
...
@@ -33,15 +32,14 @@ The basic syntax for specifying CSS/JavaScript groups files is ::
}
PIPELINE_JS = {
'
all
': {
'
stats
': {
'source_filenames': (
'js/jquery-1.2.3.js',
'js/jquery-preload.js',
'js/jquery.pngFix.js',
'js/my_script.js',
'js/my_other_script.js'
'js/jquery.js',
'js/d3.js',
'js/collections/*.js',
'js/application.js',
),
'output_filename': 'js/
all_compressed
.js',
'output_filename': 'js/
stats
.js',
}
}
...
...
@@ -75,7 +73,6 @@ Group options
Defaults to ``None``.
``manifest``
............
...
...
docs/storages.rst
View file @
0fee8967
...
...
@@ -7,8 +7,8 @@ Storages
Using with a custom storage
===========================
Pipeline use `Django Storage <https://docs.djangoproject.com/en/dev/ref/
files/storage/
>`_
to read, save and delete files, by default it use an improved ``
FileSystem
Storage``.
Pipeline use `Django Storage <https://docs.djangoproject.com/en/dev/ref/
contrib/staticfiles/#storages
>`_
to read, save and delete files, by default it use an improved ``
StaticFiles
Storage``.
You can provide your own via ``PIPELINE_STORAGE`` : ::
...
...
@@ -18,18 +18,14 @@ You can provide your own via ``PIPELINE_STORAGE`` : ::
Using with staticfiles
======================
Pipeline is providing a
Finder
for `staticfiles app <https://docs.djangoproject.com/en/dev/howto/static-files/>`_,
to use it configure ``STATICFILES_
FINDERS`` like so :
::
Pipeline is providing a
storage
for `staticfiles app <https://docs.djangoproject.com/en/dev/howto/static-files/>`_,
to use it configure ``STATICFILES_
STORAGE`` like so
::
STATICFILES_FINDERS = (
'pipeline.finders.PipelineFinder',
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
)
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
And if you want versioning use ::
.. note::
``PipelineFinder`` should be the first finder in ``STATICFILES_FINDERS``.
STATICFILES_STORAGE = 'pipeline.storage.PipelineCachedStorage'
Pipeline is also providing a storage that play nicely with staticfiles app
particularly for development : ::
...
...
docs/usage.rst
View file @
0fee8967
...
...
@@ -30,9 +30,20 @@ If you have specified the CSS-groups “screen” and “print” and a JavaScri
with the name “scripts”, you would use the following code to output them all ::
{% load compressed %}
{% compressed_css 'screen' %}
{% compressed_css 'print' %}
{% compressed_js 'scripts' %}
{% compressed_css 'colors' %}
{% compressed_js 'stats' %}
Collect static
==============
Pipeline integrates with staticfiles, you just need to setup ``STATICFILES_STORAGE`` to ::
STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
Then when you run ``collectstatic`` command, your CSS and your javascripts will be compressed in the same time ::
$ python oslo/manage.py collectstatic
Middleware
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment