Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#7230 closed (fixed)

No save_m2m method on BaseModelFormSet or BaseInlineFormSet

Reported by: brooks.travis@… Owned by: brosner
Component: Forms Version: newforms-admin
Severity: Keywords: nfa-blocker
Cc: cmawebsite@… Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


There is currently no similar method to ModelForm's save_m2m for saving m2m relationship data after a save(commit=False) on a BaseModelFormSet or BaseInlineFormSet.

Attachments (1)

7230_formset_save_m2m.diff (1.5 KB) - added by brosner 8 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 8 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to brosner
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Accepted

This makes sense. [7507] made save() on a model formset only return changed instances. That logic should be abstracted out. Providing a save_m2m() on the BaseModelFormSet would make alot of sense.

Changed 8 years ago by brosner

comment:2 Changed 8 years ago by brosner

  • Has patch set
  • milestone set to 1.0 alpha
  • Needs documentation set
  • Needs tests set

Attached a patch, but need to add some tests and documentation.

comment:3 Changed 8 years ago by garcia_marc

  • Keywords nfa-blocker added

I add nfa-blocker keyword as synonym of 1.0 alpha milestone (just for organization).

comment:4 Changed 8 years ago by CollinAnderson

  • Cc cmawebsite@… added

comment:5 Changed 8 years ago by brosner

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

(In [7930]) newforms-admin: Fixed #7230 -- Added a save_m2m method to BaseModelFormSet when commit=False is passed to save. Thanks Books Travis for the original report.

comment:6 Changed 5 years ago by jacob

  • milestone 1.0 alpha deleted

Milestone 1.0 alpha deleted

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