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
2fd5d4b5
Commit
2fd5d4b5
authored
May 20, 2011
by
Timothée Peignier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add basic doc for javscript templating
parent
f420dae8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
4 deletions
+32
-4
docs/configuration.rst
+32
-4
No files found.
docs/configuration.rst
View file @
2fd5d4b5
...
...
@@ -182,9 +182,36 @@ The files will however still be concatenated to one file.
Please note that in order to use YUI Compressor, you need to install YUI Compressor (see :doc:`installation` for more details).
``COMPRESS_TEMPLATE_NAMESPACE``
...............................
Object name where all of your compiled templates will be added, from within your browser.
To access them with your own JavaScript namespace, change it to the object of your choice.
Defaults to ``"window.JST"``
``COMPRESS_TEMPLATE_EXT``
.........................
The extension for which django-compress will consider the file as a Javascript templates.
To use a different extension, like ``.mustache``, set this settings to ``.mustache``.
Defaults to ``".jst"``
Rewriting CSS url()
-------------------
``COMPRESS_TEMPLATE_FUNC``
..........................
JavaScript function that compiles your JavaScript templates.
django-compress doesn't bundle a javascript template library, but the default
settings is to use the
`underscore <http://documentcloud.github.com/underscore/>`_ template function.
Defaults to ``"_.template"``
Rewriting CSS urls
==================
If source CSS contain a relative URL (i.e. relative to current file),
those URL will be converted to full relative path using ``COMPRESS_URL``.
...
...
@@ -214,7 +241,7 @@ In resulting CSS it will be rewritten to ::
External urls
-------------
=============
While django-compress does a great job of minimizing the amount of http requests
on your site (hence increasing performance) there are sometimes cases when you
...
...
@@ -243,7 +270,8 @@ Output in when ``settings.COMPRESS = False``::
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.5.2/jquery-ui.min.js" charset="utf-8"></script>
<script type="text/javascript" src="/media/js/blog.js" charset="utf-8"></script><script type="text/javascript" src="/media/js/comments.js" charset="utf-8"></script>
<script type="text/javascript" src="/media/js/blog.js" charset="utf-8"></script>
<script type="text/javascript" src="/media/js/comments.js" charset="utf-8"></script>
Output in when ``settings.COMPRESS = True``::
...
...
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