title: Comments in the admin panel are added, but they are not visible on the site
body: <p>Based on this tutorial <a href="https://www.youtube.com/watch?v=An4hW4TjKhE&amp;ab_channel=AbhishekVerma" rel="nofollow noreferrer">https://www.youtube.com/watch?v=An4hW4TjKhE&amp;ab_channel=AbhishekVerma</a>
  I'm trying to add the ability to add comments under posts, add a comment in the admin panel, everything is ok, but the site does not display anything under the post</p>
  <p>here is <strong>models.py</strong></p>
  <pre><code>
      from django.db import models
      from django.urls import reverse
      from django.contrib.auth.models import User
      from django.contrib.contenttypes.models import ContentType
      
      
      class Post(models.Model):
          published = None
          title = models.CharField(max_length=200)
          author = models.ForeignKey(
              'auth.User',
              on_delete=models.CASCADE,
          )
          body = models.TextField()
          header_image = models.ImageField(blank=True, null=True, upload_to=&quot;images/&quot;, default='fox.jpeg')
      
          def __str__(self):
              return self.title
      
          def get_absolute_url(self):
              return reverse('post_detail', args=[str(self.id)])
      
      
      class Comment(models.Model):
      
          post = models.ForeignKey(Post, on_delete=models.CASCADE, related_name='post_post')
          user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='user_user')
          content = models.TextField(max_length=160)
          timestamp = models.DateTimeField(auto_now_add=True)
      
          def __str__(self):
              return '{}-{}'.format(self.post.title, str(self.user.username))
  
  </code></pre>
  <p><strong>views.py</strong></p>
  <pre><code>
      from django.http import HttpResponseRedirect
      from django.shortcuts import render, get_object_or_404
      from django.views.generic import ListView, DetailView
      from django.views.generic.edit import CreateView, UpdateView, DeleteView
      from django.urls import reverse_lazy
      from .models import Post, Comment
      from django import forms
      from .forms import *
      
      
      class BlogListView(ListView):
          model = Post
          template_name = 'home.html'
      
          context_object_name = 'posts'
          paginate_by = 2
          queryset = Post.objects.all()
      
      class BlogDetailView(DetailView):
          model = Post
          template_name = 'post_detail.html'
      
      class BlogCreateView(CreateView):
          model = Post
          template_name = 'post_new.html'
          fields = ['title', 'author', 'body', 'header_image']
      
      class BlogUpdateView(UpdateView):
          model = Post
          template_name = 'post_edit.html'
          fields = ['title', 'body', 'header_image']
      
      class BlogDeleteView(DeleteView):
          model = Post
          template_name = 'post_delete.html'
          success_url = reverse_lazy('home')
      
      
      @property
      def image_url(self):
          &quot;&quot;&quot;
          Return self.photo.url if self.photo is not None,
          'url' exist and has a value, else, return None.
          &quot;&quot;&quot;
          if self.image:
              return getattr(self.photo, 'url', None)
          return None
      
      def post_detail(request, id, slug):
          post = get_object_or_404(Post, id=id, slug=slug)
          comments = Comment.objects.filter(post=post).order_by('-id')
          is_liked = False
          if post.likes.filter(id=request.user.id).exists():
              is_liked = True
      
          if request.method == 'POST':
              comment_form = CommentForm(request.POST or None)
              if comment_form.is_valid():
                  content = request.POST.get('content')
                  comment = Comment.objects.create(post=post, user=request.user, content=content)
                  comment.save()
                  return HttpResponseRedirect(post.get_absolute_url())
      
          else:
              comment_form = CommentForm()
      
          context = {
              'post': post,
              'is_liked': is_liked,
              'total_likes': post.total_likes(),
              'comments': comments,
              'comment_form': comment_form,
          }
          return render(request, 'myblog/post_detail.html', context) #his &quot;blog&quot; = my &quot;myblog&quot;
      
      class CommentForm(forms.ModelForm):
          class Meta:
              model = Comment
              fields = ('content',)
  
  </code></pre>
  <p><strong>post_detail.html</strong></p>
  <pre><code>
      {% extends 'base.html' %}
      
      {% block content %}
          &lt;div class=&quot;post-entry&quot;&gt;
              &lt;h2&gt;{{ post.title }}&lt;/h2&gt;
              &lt;p&gt;{{ post.body }}&lt;/p&gt;
          &lt;/div&gt;
      
          &lt;p&gt;&lt;a href=&quot;{% url 'post_edit' post.pk %}&quot;&gt;+ Edit Blog Post&lt;/a&gt;&lt;/p&gt;
          &lt;p&gt;&lt;a href=&quot;{% url 'post_delete' post.pk %}&quot;&gt;+ Delete Blog Post&lt;/a&gt;&lt;/p&gt;
          &lt;img src=&quot;{{ post.header_image.url|default_if_none:'fox.jpeg' }}&quot;&gt;
      
          {{ post.body|urlize }}
      
      
      
          {% for comm in post.commentpost_set.all%}
              {{ comm.user }} &lt;br&gt;
              {{ comm.text }} &lt;br&gt;&lt;br&gt;
          {% endfor %}
      {% endblock content %}
      
      
      &lt;br&gt;&lt;br&gt;
      &lt;hr&gt;
      
      &lt;form method=&quot;post&quot;&gt;
          {% csrf_token %}
          {{ comment_form.as_p }}
          {% if request.user.is_authenticated %}
              &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;btn btn-outline-success&quot;&gt;
          {% else %}
              &lt;input type=&quot;submit&quot; value=&quot;Submit&quot; class=&quot;btn btn-outline-success&quot; disabled&gt;
          {% endif %}
      &lt;/form&gt;
      
      &lt;div class=&quot;main-comment-section&quot;&gt;
          {{ comments.count }} Comment{{ comments|pluralize }}
          {% for comment in comments %}
              &lt;blockquote class=&quot;blockquote&quot;&gt;
                  &lt;p class=&quot;mb-0&quot;&gt;{{ comment.content }}&lt;/p&gt;
                  &lt;footer class=&quot;blockquote-footer&quot;&gt;by &lt;cite title=&quot;Source Title&quot;&gt;{{ comment.user|capfirst }}&lt;/cite&gt;&lt;/footer&gt;
              &lt;/blockquote&gt;
          {% endfor %}
      &lt;/div&gt; 
  
  </code></pre>
  <p><strong>myblog/urls.py</strong></p>
  <pre><code>
      from django.urls import path
      
      from .views import (
          BlogListView,
          BlogDetailView,
          BlogCreateView,
          BlogUpdateView,
          BlogDeleteView,
      )
      
      urlpatterns = [
          path('post/new/', BlogCreateView.as_view(), name='post_new'),
          path('post/&lt;int:pk&gt;/', BlogDetailView.as_view(), name='post_detail'),
          path('post/&lt;int:pk&gt;/edit/',BlogUpdateView.as_view(), name='post_edit'),
          path('post/&lt;int:pk&gt;/delete/',BlogDeleteView.as_view(), name='post_delete'),
          path('', BlogListView.as_view(), name='home'),
      
      ]
  
  </code></pre>
  <p><strong>base.html</strong></p>
  <pre><code>
      {% load static %}
      &lt;html&gt;
        &lt;head&gt;
          &lt;title&gt;Django blog&lt;/title&gt;
          &lt;link href=&quot;https://fonts.googleapis.com/css?family=Source+Sans+Pro:400&quot;
          rel=&quot;stylesheet&quot;&gt;
          &lt;link href=&quot;{% static 'css/base.css' %}&quot; rel=&quot;stylesheet&quot;&gt;
        &lt;/head&gt;
        &lt;body&gt;
          &lt;div&gt;
            &lt;header&gt;
              &lt;div class=&quot;nav-left&quot;&gt;
                &lt;h1&gt;&lt;a href=&quot;{% url 'home' %}&quot;&gt;Django blog&lt;/a&gt;&lt;/h1&gt;
                  &lt;h2&gt;&lt;a href=&quot;http://127.0.0.1:8000/admin/&quot;&gt;Admin&lt;/a&gt;&lt;/h2&gt;
      
              &lt;/div&gt;
              &lt;div class=&quot;nav-right&quot;&gt;
                 &lt;a href=&quot;{% url 'post_new' %}&quot;&gt;+ New Blog Post&lt;/a&gt;
              &lt;/div&gt;
            &lt;/header&gt;
            {% if user.is_authenticated %}
              &lt;p&gt;Hi {{ user.username }}!&lt;/p&gt;
            {% else %}
              &lt;p&gt;You are not logged in.&lt;/p&gt;
              &lt;a href=&quot;{% url 'login' %}&quot;&gt;Log In&lt;/a&gt;&lt;br&gt;
                &lt;p&gt;&lt;a href=&quot;http://127.0.0.1:8000/accounts/signup/&quot;&gt;Sign up&lt;/a&gt;&lt;/p&gt;
            {% endif %}
          {% block content %}
          {% endblock content %}
          &lt;/div&gt;
        &lt;/body&gt;
      &lt;/html&gt;
      
      
      
      &lt;ul class=&quot;pagination&quot;&gt;
          {% if page_obj.has_previous %}
              {% if page_obj.number|add:'-3' &gt; 1 %}
                  &lt;li class=&quot;pagination__item&quot;&gt;
                      &lt;a href=&quot;?{{ post }}{{ post }}page=1&quot;&gt;1&lt;/a&gt;
                  &lt;/li&gt;
              {% endif %}
              {% if page_obj.number|add:'-3' &gt;= 3 %}
                  &lt;li class=&quot;pagination__item pagination__item--dots&quot;&gt;
                          &lt;a href=&quot;?{{ genre }}{{ year }}page={{ page_obj.previous_page_number|add:'-3' }}&quot;&gt;
                      &lt;span class=&quot;pagination__link&quot;&gt;• • •&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
              {% endif %}
          {% endif %}
          {% if paginator.page_range|length &gt; 1 %}
              {% for i in paginator.page_range %}
                  {% if page_obj.number == i %}
                      &lt;li class=&quot;pagination__item active&quot;&gt;
                          &lt;a class=&quot;pagination__link&quot; href=&quot;#&quot;&gt;{{ i }}&lt;/a&gt;
                      &lt;/li&gt;
                  {% elif i &gt; page_obj.number|add:'-4' and i &lt; page_obj.number|add:'4' %}
                      &lt;li class=&quot;pagination__item&quot;&gt;
                              &lt;a class=&quot;pagination__link&quot; href=&quot;?{{ genre }}{{ year }}page={{ i }}&quot;&gt;{{ i }}&lt;/a&gt;
                      &lt;/li&gt;
                  {% endif %}
              {% endfor %}
          {% endif %}
          {% if page_obj.has_next %}
              {% if page_obj.number|add:'4' &lt; page_obj.paginator.num_pages %}
                  &lt;li class=&quot;pagination__item pagination__item--dots&quot;&gt;
                          &lt;a href=&quot;?{{ genre }}{{ year }}page={{ page_obj.next_page_number|add:'3' }}&quot;&gt;
                      &lt;span class=&quot;pagination__link&quot;&gt;• • •&lt;/span&gt;
                      &lt;/a&gt;
                  &lt;/li&gt;
              {% endif %}
              {% if page_obj.number|add:'3' &lt; page_obj.paginator.num_pages %}
                  &lt;li class=&quot;pagination__item&quot;&gt;
                          &lt;a class=&quot;pagination__link&quot; href=&quot;?{{ genre }}{{ year }}page={{ page_obj.paginator.num_pages }}&quot;&gt;
                              {{ page_obj.paginator.num_pages }}
                          &lt;/a&gt;
                  &lt;/li&gt;
              {% endif %}
          {% endif %}
      &lt;/ul&gt;
  
  </code></pre>
  <p><em>Thanks for any help</em></p>