In django templates, it\'s common to do the following:
How would you accomplish this in a
Where is your css file served from? This usually isn't a problem as a common media structure such as:
media/
images/
css/
js/
(or similar) allows for relative file paths for images, eg:
background: url('../images/foo.png');
If you're not prepared to change your media folder structure to accommodate relative file paths, you may have no alternative but to overwrite css declarations from within the template, using a secondary css file when offline:
{% if DEBUG %}
{% endif %}
Of course the first option is much tidier.