Ticket #12569: genericinlinemodeladmin_get_formset_kwargs_fix.diff
File genericinlinemodeladmin_get_formset_kwargs_fix.diff, 811 bytes (added by , 15 years ago) |
---|
-
django/contrib/contenttypes/generic.py
382 382 ct_fk_field = "object_id" 383 383 formset = BaseGenericInlineFormSet 384 384 385 def get_formset(self, request, obj=None ):385 def get_formset(self, request, obj=None, **kwargs): 386 386 if self.declared_fieldsets: 387 387 fields = flatten_fieldsets(self.declared_fieldsets) 388 388 else: … … 400 400 "max_num": self.max_num, 401 401 "exclude": self.exclude 402 402 } 403 defaults.update(kwargs) 403 404 return generic_inlineformset_factory(self.model, **defaults) 404 405 405 406 class GenericStackedInline(GenericInlineModelAdmin):