title: My Django web page is not rendering models. How can i fix it?
body: <p>I was learning Django but I got in some trouble, Please Help!
  There is no error on either server or webpage.</p>
  <p>My HomePage(index.html) is working fine but DetailPage(post.html) is rendering blank.</p>
  <p>blog/views.py</p>
  <pre><code>from .models import Article
  from django.views import generic
  
  
  class HomePage(generic.ListView):
      template_name = 'blog/index.html'
      queryset = Article.objects.filter().order_by('date')
      context_object_name = 'Article_list'
  
  
  class DetailPage(generic.DetailView):
      template_name = 'blog/post.html'
      model = Article
  </code></pre>
  <p>blog/urls.py</p>
  <pre><code>from django.urls import path
  from . import views
  
  app_name = 'blog'
  urlpatterns = [
      path('', views.HomePage.as_view(), name='home'),
      path('&lt;int:pk&gt;/', views.DetailPage.as_view(), name='detail')
  ]
  </code></pre>
  <p>blog/models.py</p>
  <pre><code>from django.db import models
  
  
  class Article(models.Model):
      title = models.CharField(max_length=200)
      body = models.TextField()
      slug = models.SlugField(max_length=200, unique=True)
      date = models.DateTimeField(auto_now_add=True)
  
      def __str__(self):
          return self.title
  
      def snippet(self):
          return self.body[:200]
  </code></pre>
  <p>blog/templates/blog/index.html</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body style=&quot;margin:10%&quot;&gt;
  {% for Article in Article_list %}
      &lt;h1 align=&quot;center&quot; style=&quot;padding-bottom:20px&quot;&gt;
          &lt;a href=&quot;{% url 'blog:detail' Article.id%}&quot;&gt;{{Article.title}}&lt;/a&gt;
      &lt;/h1&gt;
      {{Article.date}}&lt;br&gt;&lt;br&gt;
      {{Article.snippet}}...&lt;br&gt;&lt;hr&gt;
  {% endfor %}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>blog/templates/blog/post.html</p>
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;h1&gt;{{Article.body}}&lt;/h1&gt;
  {{Article.body}}&lt;br&gt;
  {{Article.body}}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>NOTE: other elements of the webpage are rendering except Python variables i.e, {{Article.body}}, {{Article.body}},  {{Article.body}}</p>