Ticket #14574: inlineformset-kwargs.diff

File inlineformset-kwargs.diff, 1.0 KB (added by Simon Litchfield, 14 years ago)
  • forms/models.py

     
    693693class BaseInlineFormSet(BaseModelFormSet):
    694694    """A formset for child objects related to a parent."""
    695695    def __init__(self, data=None, files=None, instance=None,
    696                  save_as_new=False, prefix=None, queryset=None):
     696                 save_as_new=False, prefix=None, queryset=None, **kwargs):
    697697        from django.db.models.fields.related import RelatedObject
    698698        if instance is None:
    699699            self.instance = self.fk.rel.to()
     
    710710            queryset = self.model._default_manager
    711711        qs = queryset.filter(**{self.fk.name: backlink_value})
    712712        super(BaseInlineFormSet, self).__init__(data, files, prefix=prefix,
    713                                                 queryset=qs)
     713                                                queryset=qs, **kwargs)
    714714
    715715    def initial_form_count(self):
    716716        if self.save_as_new:
Back to Top