title: Django get_queryset filter objects on pk
body: <p>So I have these models <strong>client</strong> and <strong>progress</strong>.
  I've mixed the Create and ListView but I only want to show progress data for the current client. I accomplished this with a hardcoded PK but when I try to make it dynamically I only get errors like</p>
  <pre><code>Field 'id' expected a number but got &lt;property object at 0x10ee5f890&gt;.
  </code></pre>
  <p>models.py</p>
  <pre><code>class Client(models.Model):
      name = models.CharField(max_length=255)
      ...
  
  class Progress(models.Model):
      client = models.ForeignKey(Client, on_delete=models.CASCADE)
      ...
  </code></pre>
  <p>views.py</p>
  <pre><code>class ProgressClient(generic.CreateView):
      template_name = 'pages/clients/progress/index.html'
      model = Progress
      form_class = ProgressForm
      success_url = reverse_lazy('index')
  
      def get_context_data(self, **kwargs):
          kwargs['object_list'] = Progress.objects.filter(client__id=1)
          return super(ProgressClient, self).get_context_data(**kwargs)
  </code></pre>
  <p>urls.py</p>
  <pre><code>
  urlpatterns = [
     path('clients/progress/&lt;slug:slug&gt;/&lt;int:pk&gt;', login_required(views.ProgressClient.as_view(), login_url='/login'), name=&quot;progress_clients&quot;),
  ]
  
  </code></pre>
  <p>I've tried things like</p>
  <pre><code>def get_context_data(self, **kwargs):
      kwargs['object_list'] = Progress.objects.filter(client__id=Client.pk)
      return super(ProgressClient, self).get_context_data(**kwargs)
  </code></pre>
  <pre><code>def get_context_data(self, **kwargs):
      client_pk = self.kwargs.get('client_id')
      kwargs['object_list'] = Progress.objects.filter(client__id=client_pk)
      return super(ProgressClient, self).get_context_data(**kwargs)
  </code></pre>