title: Django function based view get_form_kwargs
body: <p>I have the following problem. </p>
  
  <p>Normally in Django Class based views the <code>get_form_kwargs</code> method is used to supply the kwargs to the forms <code>__init__()</code>. For example:</p>
  
  <pre><code>class ComponentForm(forms.ModelForm):
      diameter = forms.ModelChoiceField(queryset=Diameter.objects.all(), label='Diameter') # required=True, 
  
      class Meta:
          model = Component
          fields = [
              'component_type',
              'diameter',
              'length'
          ]
  
      def __init__(self, *args, **kwargs):
          circuit = kwargs.pop('circuit')
          project = kwargs.pop('project')
          super(ComponentForm, self).__init__(*args, **kwargs)
          self.fields['diameter'].queryset = Diameter.objects.filter(project=project, material = circuit.material_type)
  </code></pre>
  
  <p>In the example code above, the "circuit" and "project" are supplied by the get_form_kwargs method in the corresponding view.</p>
  
  <p>The question is now how to pass these kwargs to the ComponentForm <code>__init__()</code> using a function based view?</p>