title: using class base view facing a issue of reverse not found
body: <p>i am using a class base d view for section.html in which i trying to implement add to cart functionality with the help of forms but after clicking add to car but it showing error</p>
  <p>Reverse for 'section' with no arguments not found. 1 pattern(s) tried: ['(?P&lt;subject_id&gt;[0-9]+)/Sections/$']</p>
  <p>here is my views.py</p>
  <pre><code>@method_decorator(login_required, name='dispatch')
  class Sections(View):
      def post(self, request, subject_id):
          sections =request.POST.get('section')
          print(sections)
          return redirect('subjects:section')
  
  
      def get(self, request, subject_id):
          subject = get_object_or_404(Subject, pk=subject_id) # retrieve the subject 
          sections = subject.section.all() # get the sections related to the subject
          return render (request, 'sections.html',{&quot;section_list&quot; : sections })
  </code></pre>
  <p>my urls.py</p>
  <pre><code>urlpatterns = [
      path('&lt;int:subject_id&gt;/Sections/', Sections.as_view(),name='section'),
  ]
  </code></pre>
  <p>my section.html</p>
  <pre><code>    &lt;ul class=&quot;sec&quot;&gt;
        {% for section in section_list %}
        &lt;div class=&quot;card col-11&quot;&gt;
          &lt;div class=&quot;card-header&quot;&gt;
          {{ section.title }}
          &lt;/div&gt;
          &lt;div class=&quot;card-body&quot;&gt;
            &lt;h5 class=&quot;card-about&quot;&gt;{{ section.about_section }}&lt;/h5&gt; &lt;br&gt;
            &lt;i class=&quot;price fas fa-rupee-sign&quot;&gt; {{ section.price }}&lt;/i&gt; &lt;br&gt; &lt;br&gt;
            &lt;i class=&quot;icon text-white fas fa-chalkboard-teacher&quot;&gt; {{ section.teacher }}&lt;/i&gt; 
            &lt;i class=&quot;icon text-white fas fa-clock&quot;&gt; {{ section.content_duration}}&lt;/i&gt;
            &lt;i class=&quot;icon text-white fas fa-tags&quot;&gt; {{ section.subject.name }}&lt;/i&gt;
            &lt;form action=&quot;#&quot; method=&quot;POST&quot;&gt;
              {% csrf_token %}
            &lt;input hidden type=&quot;text&quot; name=&quot;section&quot; value=&quot;{{section.id}}&quot;&gt;
            &lt;input type=&quot;submit&quot; class=&quot;btn btn-outline-primary&quot; value=&quot;Add To Cart&quot;&gt;
          &lt;/form&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        {% endfor %}
    &lt;/ul&gt;
  </code></pre>
  <p>my section model is contected with another models name subject with foriegn key</p>