title: Can a ModelForm accept __init__ parameters when used in a Formset?
body: <p>Is it possible to use a <code>ModelForm</code>, that accepts a <code>request.user</code> parameter in it's <code>__init__</code> method, as part of a <code>Formset</code>?</p>
  
  <p>I have the following <code>ModelForm</code> that has a <code>user</code> parameter in it's <code>__init__</code>:</p>
  
  <pre><code>class ExpenditureForm(forms.ModelForm):
      exp_date = forms.DateField(
          widget=AdminDateWidget(attrs={'class':'exp_date_class'}))
      description = forms.CharField(max_length=500)
      amount = forms.FloatField(initial=0)
      currency = forms.CharField(
          widget=forms.TextInput(
              attrs={'class':'currencyClass',}), initial="MYR")
      exp_pocket = forms.ModelChoiceField(
          queryset=Pockets.objects.none(),
          to_field_name="exp_pocket")
  
      class Meta:
          model = Expenditure
  
      def __init__(self, user, *args, **kwargs):
          super(ExpenditureForm, self).__init__(*args, **kwargs)
          self.fields['exp_pocket'].queryset = \
              Pockets.objects.filter(pocket_owner=user)
  </code></pre>
  
  <p>and the following <code>Formset</code>:</p>
  
  <pre><code>ExpFormSet = modelformset_factory(
      Expenditure, extra=10, max_num=10,
      fields=('exp_date', 'description', 'amount', 'currency', 'exp_pocket'),
      can_delete=False)
  </code></pre>
  
  <p>The <code>Expenditure</code> model is:</p>
  
  <pre><code>class Expenditure(models.Model):
      exp_owner= models.CharField(default='None',max_length=50)
      exp_date = models.DateField("Expenditure_Date")
      description = models.CharField(max_length=500)
      amount = models.FloatField(default=0)
      currency = models.CharField(max_length=15,default="MYR",editable=True)
      exp_pocket = models.ForeignKey(Pockets, null=True, blank=True)
  
      class Meta:
          unique_together = ('exp_date', 'description',)
  </code></pre>