title: Static - image rendering returning a HTTP 404 error in Django 1.9.1
body: <p>I am a beginner in Django and am having an issue with a template rendering an image url from the database.  The image paths for my other images work fine. hard coded also works fine rendering my other images.Ex: </p>
  
  <pre><code>&lt;img class="img-responsive logo" src="{% static 'media/images/logo.png' %}" alt="logo" /&gt;
  </code></pre>
  
  <p>but when I use this format or hardcode in template:</p>
  
  <pre><code>{%for m in users%}
   &lt;img src="{% static 'media/{{m.image}}' %}" alt="{{m}}" /&gt;
  {%endfor %}
  </code></pre>
  
  <p>I get no image rendered and the following error when I inspect element (chrome):</p>
  
  <pre><code>http://127.0.0.1:8000/static/media/%7B%7Bm.image%7D%7D 
  Failed to load resource: the server responded with a status of 404 (Not Found)
  </code></pre>
  
  <p>as you can see in the 404 error the "squiggly brackets" aren't being processed.</p>
  
  <p>I should note that when I do: </p>
  
  <pre><code>{{m.image}}
  </code></pre>
  
  <p>the saved url in the database returns the path of the image as saved in the database. I used  the ImageField() in my model.  </p>
  
  <p><strong>my settings.py</strong> </p>
  
  <pre><code>STATIC_URL = '/static/'
  STATICFILES_DIRS =    ['/Users/coreygumbs/Documents/Ibhuku/IbhukuProject2/ibhuku/static/',]
  STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'static')
  
  MEDIA_URL = '/media/'
  MEDIA_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'static', 'media')
  </code></pre>
  
  <p><strong>my root urls.py</strong></p>
  
  <pre><code>urlpatterns = [
          #HomeView class is the homepage template
          url(r'^$', HomeView.as_view(), name='home'),
          url(r'^admin/', admin.site.urls),
          url(r'^accounts/', include('accounts.urls', namespace='accounts')),
  ] 
  
  if settings.DEBUG:
      urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
      urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p><strong>my template code</strong></p>
  
  <pre><code>{% extends "_profilebase.html" %}
  {% load staticfiles %}
  {% block profile %}
  
  &lt;div class="accountsProfile"&gt;
      {% for m in Users%}
          &lt;h3&gt;{{m}}&lt;/h3&gt;
          {{m.first_name}} {{m.last_name}}&lt;br/&gt;
          {{m.username}}&lt;br/&gt;
          {{m.image}}&lt;br/&gt;
          &lt;img src="{% static 'media/{{m.image}}' %}" alt="{{m}}" /&gt;
      {% endfor %}
  &lt;/div&gt;
  {% endblock profile %}
  </code></pre>
  
  <p>I have also used "collectstatic" </p>
  
  <p>any help or advice would be greatly appreciated. Thanks in advance. </p>