title: How to set STATIC_URL in Django settings.py for CDN
body: <p>I want to use static file in my django 2.0.5 template that is located on:</p>
  
  <pre><code>https://my_cloud_front_adress.cloudfront.net/staticfiles/picture_small.jpg
  </code></pre>
  
  <p>On Heroku i've set varible:  </p>
  
  <pre><code>STATIC_URL = https://my_cloud_front_adress.cloudfront.net/staticfiles/
  </code></pre>
  
  <p><strong>templates/base.html</strong></p>
  
  <pre><code>{% load static %}
  
  {# this one is NOT working #}
  &lt;img src="{% static 'picture_small.jpg' %}" alt="my test image"/&gt;
  
  {# this one is working #}
  &lt;img src="https://my_cloud_front_adress.cloudfront.net/staticfiles/picture_small.jpg" alt="my test image"/&gt;
  </code></pre>
  
  <p>How should i set <code>STATIC_URL</code> to make this work in the template:</p>
  
  <pre><code>&lt;img src="{% static 'picture_small.jpg' %}" alt="my test image"/&gt;
  </code></pre>