title: django-summernote view uploaded image from template
body: <p>I'm trying to view my uploaded images when uploading from summernote.</p>
  
  <p>Here is my static and media for settings.py:</p>
  
  <pre><code>STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
  STATIC_URL = '/static/'
  STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
  
  MEDIA_ROOT = "static/"
  MEDIA_URL = "/./"
  </code></pre>
  
  <p>This articles.html template displays my static files just fine:</p>
  
  <pre><code>{% extends 'base.html' %}
  {% load static from staticfiles %}
  
  {% block content %}
    {% for post in object_list %}
    &lt;div class="card rounded border-1 border-secondary"&gt;
      &lt;div class="card-header bg-dark text-light"&gt;
          &lt;h4&gt;{{ post.title }}&lt;/h4&gt;
          &lt;small&gt;Posted: {{ post.date }}&lt;/small&gt;
      &lt;/div&gt;
      &lt;div class="card-body bg-light"&gt;
        &lt;img src={{ post.image.url }} width="300" height="200"&gt;
        &lt;p class="card-text"&gt;{{ post.description }}&lt;/p&gt;
      &lt;/div&gt;
      &lt;div class="card-body bg-light"&gt;
        &lt;a href="{% url 'post_detail' post.pk %}" class="card-link"&gt;Read more...&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;p&gt;&lt;/p&gt;
    {% endfor %}
  {% endblock content %}
  </code></pre>
  
  <p>I need to embed images in my post_detail.html post.body (|safe just for testing):</p>
  
  <pre><code>{% extends 'base.html' %}
  
  {% block content %}
    &lt;div class="post-entry"&gt;
      &lt;h2&gt;{{ post.title  }}&lt;/h2&gt;
      &lt;p&gt;{{ post.body|safe }}&lt;/p&gt;
    &lt;/div&gt;
  {% endblock content %}
  </code></pre>
  
  <p>When I try to update the post.body with the images I get:</p>
  
  <pre><code>[07/Feb/2019 12:43:24] "GET /admin/blog/post/2/change/ HTTP/1.1" 200 10150
  [07/Feb/2019 12:43:24] "GET /admin/jsi18n/ HTTP/1.1" 200 3185
  [07/Feb/2019 12:43:25] "GET /summernote/editor/id_body/ HTTP/1.1" 200 6349
  [07/Feb/2019 12:43:27] "GET /static/summernote/lang/summernote-en-US.min.js?_=1549561406677 HTTP/1.1" 200 27
  [07/Feb/2019 12:43:38] "POST /summernote/upload_attachment/ HTTP/1.1" 200 179
  Not Found: /django-summernote/2019-02-07/c4ad147f-01d0-464f-ab2d-e2ce60d5c62f.jpg
  [07/Feb/2019 12:43:38] "GET /django-summernote/2019-02-07/c4ad147f-01d0-464f-ab2d-e2ce60d5c62f.jpg HTTP/1.1" 404 4071
  [07/Feb/2019 12:43:42] "POST /admin/blog/post/2/change/ HTTP/1.1" 302 0
  [07/Feb/2019 12:43:42] "GET /admin/blog/post/ HTTP/1.1" 200 4758
  [07/Feb/2019 12:43:43] "GET /admin/jsi18n/ HTTP/1.1" 200 3185
  </code></pre>
  
  <p>When I check the post_detail.html page there is no image, but works fine when embedded from a link.</p>
  
  <p>I don't want to change my media root or url, to avoid breaking its usage on other parts of the site.</p>
  
  <p>Tried to search for quite a while, but I can't find out how to fix this.</p>