title: How to show DB data in my HTML page in Django website?
body: <p>I checked my DB table and the data I entered is on my db, but I see nothing on my HTML page in my Django website.</p>
  <p>this is my View:</p>
  <pre><code>from django.shortcuts import render
  from django.http import HttpResponse, JsonResponse
  from .models import Article
  
  
  # Create your views here.
  def home(request):
  context = {
      &quot;articles&quot;: Article.objects.filter(status=&quot;publish&quot;).order_by(&quot;-publish&quot;)
  }
  return render(request, 'website/home.html', context)
  </code></pre>
  <p>This is my model:</p>
  <pre><code>   from django.db import models
     from django.utils import timezone       
    # Create your models here.
    class Article(models.Model):
     STATUS_CHOICES = (
      ('Draft', 'Draft'),
      ('Published', 'Published')
  )
  title = models.CharField(max_length=300)
  slug = models.SlugField(max_length=100, unique=True)
  description = models.TextField()
  thumbnail = models.ImageField(upload_to=&quot;images&quot;)
  publish = models.DateTimeField(default=timezone.now)
  created = models.DateTimeField(auto_now_add=True)
  updated = models.DateTimeField(auto_now=True)
  status = models.CharField(max_length=10, choices=STATUS_CHOICES)
  
  def __str__(self):
      return self.title
  </code></pre>
  <p>this is my HTML page:</p>
  <pre><code>&lt;div style=&quot;text-align: center;&quot;&gt;
  {% for article in articles %}
  &lt;img src=&quot;{{ article.thumbnail.url}}&quot; alt=&quot;{{ article.title }}&quot;&gt;
  &lt;h1&gt;&lt;a href=&quot;{{ article.slug }}&quot;&gt; {{ article.title }}&lt;/a&gt;&lt;/h1&gt;
  &lt;small&gt;{{ article.publish }}&lt;/small&gt;
  &lt;p&gt;{{ article.description }}&lt;/p&gt;
  {% endfor %}
  </code></pre>