title: Use Django template syntax in a css file
body: <p>I have a css file <em>home_global.css</em> which has the following in it:</p>
  
  <pre><code>body {
      background-image: url("{% static 'citator/citator.jpg' %}");
  }
  </code></pre>
  
  <p>This static file is loaded using:</p>
  
  <pre><code>&lt;link rel="stylesheet" href="{% static 'citator/home_global.css' %}" type="text/css"&gt;
  </code></pre>
  
  <p>However the url of the background-image, expectedly, doesn't resolve but is parsed literally. What I would like to do is enable Django template syntax in the css file.</p>
  
  <p>Please note that the static URLs etc are all set up correctly and this question doesn't involve that.</p>
  
  <p>This question is very similar to another question that I myself asked a month ago:
  <a href="https://stackoverflow.com/questions/54495148/how-to-use-django-template-syntax-in-static-files">How to use django template syntax in static files</a></p>
  
  <p>However, the answer provided there was specific to <em>javascript</em>, and in particular noted that "The fundamental issue that prevents this is that context is passed to the template that is mentioned in your render() function in the view(or any other function the behaves the same way e.g. render_to-response())."</p>
  
  <p>If I understand this correctly, the same limitation does not apply here. Furthermore, I've subsequently learned from the Django documentation that it is possible to use Django template syntax in a variety of text documents. It therefore seems to me that in <em>this</em> case, where I want to use it in a css file, this should be possible. So, how can I do this?</p>