Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3232 closed enhancement (fixed)

[patch] apply_changes for all forms

Reported by: SmileyChris Owned by: adrian
Component: Forms Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


It seems like the recently added apply_changes method (to form_for_instance) could be useful in other cases too if it was a bit more "open-minded".

Attachments (1)

apply_changes.patch (4.5 KB) - added by SmileyChris 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by SmileyChris

comment:1 Changed 9 years ago by SmileyChris

No tests added, just updated the wording of the existing tests. It will need some new ones, but I just wanted to show Adrian my idea to see if it has merit for now.

See previous discussion:

comment:2 Changed 9 years ago by adrian

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

(In [4300]) Fixed #3232 -- newforms: Added save_instance(), which saves a given bound form's clean_data into a given model instance with the same field names

comment:3 Changed 9 years ago by adrian

For the record, I took a different approach than the patch suggested. I wasn't comfortable with the default_instance bit of magic on the Form class, and I didn't like putting database-aware code in django/newforms/

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