title: Get URL pk in django forms.py
body: <p>I have this URL</p>
  
  <pre><code>path('private/productores/&lt;pk&gt;', views.Productor_Private.as_view()),
  </code></pre>
  
  <p>Views.py</p>
  
  <pre><code>class Productor_Private(generic.DetailView):
      model = Productor
      template_name = 'firstpage/productor_private.html'
  
      def get(self, request, pk):
          form = RepartoForm()
          return render(request, self.template_name, {'form': form})
  
      def post(self, request, pk):
          form = RepartoForm(request.POST)
  
          if form.is_valid():
              return render(request, self.template_name, args)
  </code></pre>
  
  <p>I want to retrieve the pk from the URL to use it as a filter inside the forms.py, to do something like this:</p>
  
  <pre><code>class RepartoForm(forms.Form):
      productos = forms.ModelMultipleChoiceField(queryset=Producto.objects.filter(productor=pk))
  </code></pre>
  
  <p>So in other words, I need to check what the current user's "productor" id is in order to only retrieve the "productos" that belong to this "productor"</p>