title: Django: ListView with post() method?
body: <p>I am trying to process two forms in a Django class based view. The site contains a form called <code>form</code> (based on <code>GET</code>) for narrowing the list results of the ListView and the second form <code>status_form</code> (based on <code>POST</code>).</p>
  
  <p>Both forms are required since the ListView returns a list of items. <code>Form</code> lets the user restrict the choices and <code>status_forms</code> lets the user flag incorrect items via a modal form (therefore it needs to be in the same template). </p>
  
  <p>My trouble is that <code>ListView</code> does not come with the method <code>post</code>, however <code>FormView</code> does. My class <code>List</code> inherits from both classes, but when I execute the class I get the error message: </p>
  
  <blockquote>
    <p><strong>Attribute Error: 'List' object has no attribute 'status_form'</strong></p>
  </blockquote>
  
  <p><strong>How should I change my implementation to allow the second form been processed via the <code>post method</code>?</strong></p>
  
  <pre><code>class List(PaginationMixin, ListView, FormMixin):
      model = ListModel
      context_object_name = 'list_objects'
      template_name = 'pages/list.html'
      paginate_by = 10 #how may items per page
  
      def get(self, request, *args, **kwargs):
          self.form = ListSearchForm(self.request.GET or None,)
          return super(List, self).get(request, *args, **kwargs)
  
      def post(self, request, *args, **kwargs):
          self.status_form = StatusForm(self.request.POST or None)
          if self.status_form.is_valid():
              ...
          else:
              return super(List, self).post(request, *args, **kwargs)
  
      def get_queryset(self):
          # define the queryset
          ...
          # when done, pass to object_list
          return object_list
  
      def get_context_data(self, **kwargs):
          context = super(List, self).get_context_data(**kwargs)
          context.update(**kwargs)
          context['form'] = self.form
          context['status_form'] = self.status_form # Django is complaining that status_form is not existing, result since the post method is not executed
          return context
  </code></pre>