title: Edit another model after creating an instance
body: <p>I am finding it difficult to achieve the following scenario:</p>
  
  <p>In my app, a user creates a project, now to that project he can link a previous team that he created or create a new team. </p>
  
  <p>A team can be part of many projects but a project is linked to only ONE team. </p>
  
  <p><strong>models.py</strong>: </p>
  
  <pre><code>class Team(models.Model):
      team_name = models.CharField(max_length=100, default = '')
      team_hr_admin = models.ForeignKey(MyUser, blank=True, null=True)
  
      def __str__(self):
          return self.team_name
  
  class TeamMember(models.Model):
      user = models.ForeignKey(MyUser)
      team = models.ForeignKey(Team)
  
      def __str__(self):
          return self.user.first_name
  
  class Project(models.Model):
      name = models.CharField(max_length=250)
      team_id = models.ForeignKey(Team, blank=True, null=True)
      project_hr_admin = models.ForeignKey(MyUser, blank=True, null=True)
  
      def get_absolute_url(self):
          return reverse('website:ProjectDetails', kwargs = {'pk' : self.pk})
  
      def __str__(self):
          return self.name 
  </code></pre>
  
  <p><strong>views.py</strong>:</p>
  
  <pre><code>class ProjectCreate(CreateView):
      model = Project
      fields = ['name']
      template_name = 'project_form.html'
  
      def form_valid(self, form):
          form.instance.project_hr_admin = self.request.user
          return super(ProjectCreate, self).form_valid(form)
  
  class ProjectDetailView(generic.DetailView):
      model = Project
      template_name = 'project_details.html'
  
  class TeamCreate(CreateView):
      model = Team
      fields = ['team_name']
      template_name = 'team_form.html'
  
      def form_valid(self, form):
          obj = form.save(commit=False)
          obj2 = Project.team_id
          obj2 = obj.team_id
          obj2.save()
          print("sucess")
  </code></pre>
  
  <p>I would like that when a user creates a team, and if the team is created it successfully. Add automatically to the Project models with the corresponding <code>team_id</code>.</p>
  
  <p>Any help would be appreciated. Thanks in advance!</p>