Permalink
Browse files

updated docs for prefix configuration setting that I added the other day

  • Loading branch information...
1 parent bb57b2d commit 025534a81fb2a01b999f6efdd7689f1f8e233f29 Patrick Altman committed Mar 14, 2009
Showing with 22 additions and 0 deletions.
  1. +22 −0 docs/Configuration.textile
@@ -63,6 +63,28 @@ This will output a file like <tt>/media/c/screen.r1213947531.css</tt>, which wil
</tt>COMPRESS_*_FILTERS</tt> can be set to an empty tuple or None to not use any filters. The files will however still be concatenated to one file.
+h4. Prefix - An Alternative to MEDIA_URL
+
+In cases where you want to deploy your compiled script and styles to somewhere other than your MEDIA_URL, say a Content Delivery
+Network, you can use the optional _prefix_ parameter:
+
+<pre><code>
+ COMPRESS_CSS = {
+ 'group_one': {
+ 'source_filenames': ('css/style.css', 'css/foo.css', 'css/bar.css'),
+ 'output_filename': 'css/one_compressed.css',
+ 'extra_context': {
+ 'media': 'screen,projection',
+ 'prefix': 'http://cdn.example.com/'
+ },
+ },
+
+ # other CSS groups goes here
+ }
+</code></pre>
+
+In this example, the template tags will render _http://cdn.example.com/css/one_compressed.css_ in the link tag. You will need to manually put there after you build as part of your deployment process.
+
h4. External urls
While django-compress does a great job of minimizing the amount of http requests on your site (hence increasing performence) there are sometimes cases

0 comments on commit 025534a

Please sign in to comment.