Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#14572 closed Bug (fixed)

Minor fix for generic inline formsets

Reported by: Simon Litchfield Owned by: nobody
Component: contrib.contenttypes Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX:

Description

Following on from #13095, generic_inlineformset_factory also needs a minor patch.

<lambda>() got an unexpected keyword argument 'widget'

Attachments (3)

generic-fix.diff (1.2 KB) - added by Simon Litchfield 7 years ago.
14572.diff (2.8 KB) - added by Preston Timmons 6 years ago.
Updated patch with tests
14572.2.diff (2.2 KB) - added by Preston Timmons 6 years ago.
Updated patch against r16228

Download all attachments as: .zip

Change History (13)

Changed 7 years ago by Simon Litchfield

Attachment: generic-fix.diff added

comment:1 Changed 7 years ago by Simon Litchfield

milestone: 1.3
Version: 1.2SVN

Note this also adds kwargs support to GenericInlineModelAdmin, as per InlineModelAdmin.

comment:2 Changed 7 years ago by Honza Král

Needs tests: set
Triage Stage: UnreviewedAccepted

Could you provide a test that demonstrates this behavior? Thanks!

Changed 6 years ago by Preston Timmons

Attachment: 14572.diff added

Updated patch with tests

comment:3 Changed 6 years ago by Preston Timmons

Needs tests: unset

I tested the patch against the current trunk and added tests.

comment:4 Changed 6 years ago by Gabriel Hurley

Component: Contrib appscontrib.contenttypes

comment:5 Changed 6 years ago by Julien Phalip

Severity: Normal
Type: Bug

comment:6 Changed 6 years ago by Julien Phalip

Easy pickings: unset
Patch needs improvement: set

I can imagine how it could be useful to pass **kwargs to GenericInlineModelAdmin.get_formset() but this would be a new feature that is not relevant to the original bug report in this ticket. The patch should focus on the bug and a new ticket could be opened specifically for that new feature.

Changed 6 years ago by Preston Timmons

Attachment: 14572.2.diff added

Updated patch against r16228

comment:7 Changed 6 years ago by Preston Timmons

Patch needs improvement: unset

Thanks for reviewing this. I removed the portion that added kwargs from the patch. That feature is documented in #9588.

comment:8 Changed 6 years ago by Julien Phalip

Triage Stage: AcceptedReady for checkin

Thanks for updating the patch. That looks great.

comment:9 Changed 6 years ago by Honza Král

Resolution: fixed
Status: newclosed

In [16234]:

Fixed #14572 -- generic_inlineformset_factory shouldn't specify default formfield_callback. Thanks prestontimmons!

comment:10 Changed 6 years ago by Jacob

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top