When using django, compress and clevercss, I set my css url to an absolute path. Clevercss then passes the path to the .ccss file without the COMPRESS_ROOT prefix (absolute path). When I set my css url to a relative path, clevercss processes the ccss files, but the browser correctly looks for relatively hosted css files (e.g. mywebsite.com/profile/user/1/css/stylesheet.css)
The compressor, however, uses MEDIA_ROOT when the css link is a relative URL, but not when an absolute URL is used. This leads to an unsuccessful effect of my css, which is either processed by clevercss, or not accessible by the browser (if only on the main page), or clevercss does not have access to files (due to the use of an absolute URL). Oddly enough, the examples offered by http://github.com/mintchaos/django_compressor use absolute URLs for css paths.
I think I'm doing something wrong here, but I'm not sure where it could be, and I spent many hours searching. I also run this locally through. /manage.py runningerver and serve some static files (images) through django. (this is good for my local development).
source
share