* COMPRESS_VERSION requires COMPRESS_AUTO to be enabled. COMPRESS_AUTO is enabled by default, but if you explicitly set it to `False` an ImproperlyConfiguredError exception will be thrown.
* </tt>COMPRESS_VERSION</tt>: regulates whether or not to add a "version number" to the outputted files filename with for use with “far future Expires”. For more information, see [FarFutureExpires]. When you specify </tt>COMPRESS_VERSION</tt> you will also need to add a placeholder (which by default is '?') for the version number in the </tt>output_filename</tt> setting. Files with new filenames will be generated if needed, and old outdated files will be removed at the same time. All files with a matching name e.g. </tt>output_filename</tt> where ? can be replaced by digits will be removed. If you for some reason have files named in the same way, you should consider moving them or putting the compressed files in their own directory.
</tt>COMPRESS_VERSION</tt> Example:
<code>
<pre><code>
COMPRESS = True
COMPRESS_VERSION = True
COMPRESS_CSS = {
...
...
@@ -54,7 +54,7 @@ COMPRESS_CSS = {
'output_filename': 'c/screen.r?.css',
},
}
</code>
</code></pre>
This will output a file like <tt>/media/c/screen.r1213947531.css</tt>, which will be re-generated and updated when you change your source files.
You can update and force updates of the compressed file(s) with the management command “synccompress”. This makes it possible to keep the files updated manually.
The command is
<code>
<pre><code>
./manage.py synccompress
</code>
</code></pre>
(assuming you are in you project-folder that contains <tt>manage.py</tt>). To force all files to be re-generated, use the argument <tt>--force</tt> (e.g. <tt>./manage.py synccompress --force</tt>)
...
...
@@ -29,12 +29,12 @@ h4. Example
If you have specified the CSS-groups “my_screen_css” and “my_print_css” and a JavaScript-group with the name “my_scripts”, you would use the following code to output them all: