Ticket #12569: genericinlinemodeladmin_get_formset_kwargs_fix.diff

File genericinlinemodeladmin_get_formset_kwargs_fix.diff, 811 bytes (added by Lars van de Kerkhof, 15 years ago)
  • django/contrib/contenttypes/generic.py

     
    382382    ct_fk_field = "object_id"
    383383    formset = BaseGenericInlineFormSet
    384384
    385     def get_formset(self, request, obj=None):
     385    def get_formset(self, request, obj=None, **kwargs):
    386386        if self.declared_fieldsets:
    387387            fields = flatten_fieldsets(self.declared_fieldsets)
    388388        else:
     
    400400            "max_num": self.max_num,
    401401            "exclude": self.exclude
    402402        }
     403        defaults.update(kwargs)
    403404        return generic_inlineformset_factory(self.model, **defaults)
    404405
    405406class GenericStackedInline(GenericInlineModelAdmin):
Back to Top