Ticket #9588: 9588.diff

File 9588.diff, 885 bytes (added by Preston Timmons, 13 years ago)
  • django/contrib/contenttypes/generic.py

    diff --git a/django/contrib/contenttypes/generic.py b/django/contrib/contenttypes/generic.py
    index 81301cf..2e5a4c5 100644
    a b class GenericInlineModelAdmin(InlineModelAdmin):  
    396396    ct_fk_field = "object_id"
    397397    formset = BaseGenericInlineFormSet
    398398
    399     def get_formset(self, request, obj=None):
     399    def get_formset(self, request, obj=None, **kwargs):
    400400        if self.declared_fieldsets:
    401401            fields = flatten_fieldsets(self.declared_fieldsets)
    402402        else:
    class GenericInlineModelAdmin(InlineModelAdmin):  
    420420            "max_num": self.max_num,
    421421            "exclude": exclude
    422422        }
     423        defaults.update(kwargs)
    423424        return generic_inlineformset_factory(self.model, **defaults)
    424425
    425426class GenericStackedInline(GenericInlineModelAdmin):
Back to Top