Currently running on django 1.3 for production and encountering an issue with using static files in my CSS and JavaScript. Strangely, there are no problems in my HTML code! How can I resolve this dilemma? Unfortunately, the Django documentation does not provide a solution.
My attempt to add static files to my CSS is as follows:
{% load static %}
{% get_static_prefix as STATIC_PREFIX %}
#main {
background-image: url("{{ STATIC_PREFIX }}img.png");
}
Although the template tag
{% load static %} {% get_static_prefix as STATIC_PREFIX %}
works perfectly fine in my HTML code, it just won't cooperate in my CSS file! Any ideas why?