Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#14572 closed Bug (fixed)

Minor fix for generic inline formsets

Reported by: simon29 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:


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 simon29 5 years ago.
14572.diff (2.8 KB) - added by prestontimmons 5 years ago.
Updated patch with tests
14572.2.diff (2.2 KB) - added by prestontimmons 4 years ago.
Updated patch against r16228

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by simon29

comment:1 Changed 5 years ago by simon29

  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Version changed from 1.2 to SVN

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

comment:2 Changed 5 years ago by Honza_Kral

  • Needs tests set
  • Triage Stage changed from Unreviewed to Accepted

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

Changed 5 years ago by prestontimmons

Updated patch with tests

comment:3 Changed 5 years ago by prestontimmons

  • Needs tests unset

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

comment:4 Changed 5 years ago by gabrielhurley

  • Component changed from Contrib apps to contrib.contenttypes

comment:5 Changed 4 years ago by julien

  • Severity set to Normal
  • Type set to Bug

comment:6 Changed 4 years ago by julien

  • 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 4 years ago by prestontimmons

Updated patch against r16228

comment:7 Changed 4 years ago by prestontimmons

  • 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 4 years ago by julien

  • Triage Stage changed from Accepted to Ready for checkin

Thanks for updating the patch. That looks great.

comment:9 Changed 4 years ago by Honza_Kral

  • Resolution set to fixed
  • Status changed from new to closed

In [16234]:

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

comment:10 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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