title: TypeError: comment_detail() missing 2 required positional arguments: 'request' and 'slug'
body: <p>I got error</p>
  <p><code>path('post/&lt;int:id&gt;/comments', comment_detail(), name='comments'),</code></p>
  <p><code>TypeError: comment_detail() missing 2 required positional arguments: 'request' and 'slug'</code></p>
  <p><strong>views.py</strong></p>
  <pre><code>from django.shortcuts import render, redirect
  from django.views.generic import ListView, DetailView
  from django.views.generic.edit import CreateView, UpdateView, DeleteView
  from django.urls import reverse_lazy
  from .forms import CommentForm
  from .models import Post
  
  
  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):
      if self.image:
          return getattr(self.photo, 'url', None)
      return None
  
  def comment_detail(request, slug):
      post = Post.objects.get(Post, slug=slug,)
  
      if request.method == 'POST':
          form = CommentForm(request.POST or None)
  
          if form.is_valid():
              obj = form.save(commit=False)
              obj.post = post
              obj.save()
  
              return redirect('detail', slug=post.slug)
      else:
          form = CommentForm()
  
      context = {
          'post': post,
          'form': form
      }
  
      return render(request,'post_detail.html', context)
  </code></pre>
  <p><strong>post_detail.html</strong></p>
  <pre><code>{% extends 'base.html' %}
  {% load static %}
  
  {% block content %}
      &lt;link href=&quot;{% static 'css/post_detail.css' %}&quot; rel=&quot;stylesheet&quot;&gt;
      &lt;div class=&quot;post-entry&quot;&gt;
          &lt;h2&gt;{{ post.title }}&lt;/h2&gt;
          &lt;p&gt;{{ post.body|urlize }}&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;
      {% if post.header_image %}
          &lt;p&gt;&lt;img src=&quot;{{post.header_image.url}}&quot;&gt;&lt;/p&gt;
      {% else %}
          &lt;p&gt;&lt;/p&gt;
      {% endif %}
  
  
      {% for comm in post.commentpost_set.all%}
          {{ comm.user }} &lt;br&gt;
          {{ comm.text }} &lt;br&gt;&lt;br&gt;
      {% endfor %}
  
      &lt;article class=&quot;content&quot; &gt;
  
          &lt;br&gt;&lt;hr&gt;
  
  
          &lt;form method=&quot;post&quot; action='{% url 'comments' %}'&gt;
              {% csrf_token %}
  
              {{ form.as_table }}
              &lt;div class=&quot;container height-100 d-flex justify-content-center align-items-center&quot;&gt;
                  &lt;div class=&quot;card p-3&quot;&gt;
                      &lt;h4&gt;Add comments&lt;/h4&gt; &lt;textarea id=&quot;textarea&quot; class=&quot;form-control&quot;&gt;&lt;/textarea&gt;
                      &lt;div class=&quot;mt-3 d-flex justify-content-between align-items-center&quot;&gt; &lt;span id=&quot;count&quot;&gt;&lt;/span&gt;&lt;br&gt;&lt;button class=&quot;btn btn-sm btn-danger&quot;&gt;Submit&lt;/button&gt; &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/form&gt;
      &lt;/article&gt;
  
  {% endblock content %}
  </code></pre>
  <p>Here is the template I am using</p>
  <p>It looks like your post is mostly code; please add more details.
  Okay, I'll add some text, what a stupid feature I don't understand, which prevents me from asking questions normally</p>
  <p>&quot;Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.&quot;</p>