code: def construct_form(self, request):
          
          if not hasattr(self, 'form_class'):
              return None
  
          if request.method == 'POST':
              form = self.form_class(self.model, request.POST, request.FILES)
          else:
              form = self.form_class(self.model)
          return form
docs: Constructs form from POST method using self.form_class.