title: Display image in template with Django
body: <p>I am trying to display images into articles in my blog project built with Django. Here is the related code: </p>
  
  <p>settings.py:</p>
  
  <pre><code>MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
  MEDIA_URL = "/media/"
  </code></pre>
  
  <p>urls.py (project):</p>
  
  <pre><code>urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
  </code></pre>
  
  <p>models.py:</p>
  
  <pre><code>class Article(models.Model):
      title = models.CharField(max_length=150)
      slug = models.SlugField(max_length=150)
      author = models.CharField(max_length=80)
      text = models.TextField(null=True)
      date = models.DateTimeField(auto_now_add=True, auto_now=False, 
                                  verbose_name="Date de parution")
      image1 = models.ImageField()
      image2 = models.ImageField()
      image3 = models.ImageField()
  
      def __str__(self):
          return self.titre
  </code></pre>
  
  <p>views.py:</p>
  
  <pre><code>def article(request, id, slug):
      article = get_object_or_404(Article, id=id, slug=slug)
      return render(request, 'blog/post.html', {'article': article})
  </code></pre>
  
  <p>post.html:</p>
  
  <pre><code>&lt;img src="{{ article.image1.url }}"/&gt;
  &lt;img src="{{ article.image2.url }}"/&gt;
  &lt;img src="{{ article.image3.url }}"/&gt;
  </code></pre>
  
  <p>However, it does not work. Images do not appear. Any suggestions ? </p>