#30742: ModelForm should allow passing update_fields to instance.save()
------------------------------+--------------------------------------
     Reporter:  Václav Řehák  |                    Owner:  nobody
         Type:  New feature   |                   Status:  closed
    Component:  Forms         |                  Version:  2.2
     Severity:  Normal        |               Resolution:  wontfix
     Keywords:  modelform     |             Triage Stage:  Unreviewed
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+--------------------------------------
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 I don't think this is worth the complication. It is easily implemented
 overriding save:

 {{{
 def save(self, commit=True):
     instance = super().save(commit=False)
     if commit:
         self.instance.save(update_fields=...)
         self._save_m2m()
     return instance
 }}}

 It's a marginal use-case, not justifying adding another `Meta` option
 here.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30742#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.d3eb1178757b1b3eb632522b3bffd563%40djangoproject.com.

Reply via email to