Ticket #14574: inlineformset-kwargs.diff
File inlineformset-kwargs.diff, 1.0 KB (added by , 14 years ago) |
---|
-
forms/models.py
693 693 class BaseInlineFormSet(BaseModelFormSet): 694 694 """A formset for child objects related to a parent.""" 695 695 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): 697 697 from django.db.models.fields.related import RelatedObject 698 698 if instance is None: 699 699 self.instance = self.fk.rel.to() … … 710 710 queryset = self.model._default_manager 711 711 qs = queryset.filter(**{self.fk.name: backlink_value}) 712 712 super(BaseInlineFormSet, self).__init__(data, files, prefix=prefix, 713 queryset=qs )713 queryset=qs, **kwargs) 714 714 715 715 def initial_form_count(self): 716 716 if self.save_as_new: