title: Using a Django variable in a CSS file
body: <p>I am trying to create a <em>dynamic</em> CSS file using the Django templating engine or any other means.</p>
  
  <p>Currently, I have a CSS rule that looks like this:</p>
  
  <pre><code>background-image: url('http://static.example.com/example.png');
  </code></pre>
  
  <p>Where <code>http://static.example.com</code> corresponds to the <code>STATIC_URL</code> variable in Python. Using the Django templating engine, I could theoretically write something like this:</p>
  
  <pre><code>background-image: url('{{ STATIC_URL }}example.png');
  </code></pre>
  
  <p>My question is, how can I use the Django templating engine (or any other means) to generate CSS dynamically?</p>