code: def form_valid(self, form):
          
  
          self.object = form.save(commit=False)
          self.object.project = self.project
  
          if self.kwargs.get('stage_id', None):
              current_stage = models.Stage.objects.get(pk=self.kwargs.get('stage_id'))
              self.object.stage = current_stage
  
          self.object.save()
  
          # Good to make note of that
          messages.add_message(self.request, messages.SUCCESS, 'Configuration %s created' % self.object.key)
  
          return super(ProjectConfigurationCreate, self).form_valid(form)
docs: Set the project on this configuration after it's valid