title: Django - Createview form_valid object.id error
body: <p>I'm trying to create a form where the object created (a project) has a relationship with another model (the channel). The problem is I can't workout how to call the channel's primary key for the project's relationship.</p>
  
  <p><strong>Models.py:</strong></p>
  
  <pre><code>class Project(models.Model):
      channel = models.ForeignKey(
          'Channel',
          on_delete=models.CASCADE,
      )
  </code></pre>
  
  <p><strong>Views.py:</strong></p>
  
  <pre><code>class ProjectCreate(CreateView):
      model = Project
      fields = ['name', 'description']
  
      def form_valid(self, form):
          Project = form.save(commit=False)
          form.instance.channel = Channel.objects.get(id=self.kwargs['channel'])
          Project.channel = channel
  
          return super(ProjectCreate, self).form_valid(form)
  </code></pre>
  
  <p>I think something else needs to be added to the forms.py file as well:</p>
  
  <p><strong>Forms.py:</strong></p>
  
  <pre><code>class ProjectForm(forms.Form):
      name = forms.CharField(max_length=50)
      description = forms.CharField(widget=forms.Textarea)
  </code></pre>