yourcelf / btb

Codebase that powers Between the Bars, a blogging platform for people in prison. Splitting/parsing/publishing PDFs, managing paper correspondence.
http://betweenthebars.org
GNU Affero General Public License v3.0
13 stars 5 forks source link

CSS relative url's aren't resolved correctly when running in DEBUG mode. #20

Open yourcelf opened 12 years ago

yourcelf commented 12 years ago

This is a result of https://github.com/jezdez/django_compressor/issues/226. The symptom is that any assets referenced via "url(...)" in a css/sass file will not resolve correctly when running in DEBUG=True.

A clumsy workaround is to symlink "img" and "fonts" static directories into site_static/CACHE:

cd site_static/CACHE/
ln -s ../../static/img .
ln -s ../../static/fonts .

This problem should not exist when you're in production mode.

kottenator commented 11 years ago

This bug is actual for me too. But I don't want to make symlinks - I have many Django apps and each has own /static/

sunshineo commented 11 years ago

+1 I'm on Amazon s3, I cannot make symlinks.

rmoorman commented 11 years ago

As a "workaround" I set the "COMPRESS_OUTPUT_DIR" to an empty string. I could not verify, that this will not introduce other problems though, but it helped in my particular situation (not using btb btw.).

COMPRESS_OUTPUT_DIR = ''

Furthermore this obviously does not resolve the real issue with compressor.