#4102: Allow UPDATE of only specific fields in model.save()
-------------------------------------+-------------------------------------
               Reporter:  Collin     |          Owner:  cgrady
  Grady <cgrady@…>                   |         Status:  new
                   Type:  New        |      Component:  Database layer
  feature                            |  (models, ORM)
              Milestone:             |       Severity:  Normal
                Version:  SVN        |       Keywords:  update fields sql
             Resolution:             |  row table modified
           Triage Stage:  Accepted   |      Has patch:  1
    Needs documentation:  1          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by jlorieau):

 Replying to [comment:60 jlorieau]:

 > The new feature could be extended with a new signal named
 {{{TrackModification}}} or {{{TrackChange}}}. On object creation,
 modification, or deletion


 Just to clarify on this point, I am proposing to emit a signal only when
 {{{save}}} (and possibly {{{__init__}}} and {{{delete}}}) is called, and
 not on every invocation of {{{__setattr__}}}. Basically, we could include
 the {{{_modified_attrs}}} information to existing signals (post_save and
 post_init) for free, making them much more powerful--for example, in
 invalidating a cached attribute only when that attribute actually changes.

 This would be a new ticket that builds on this feature, if this feature is
 approved.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/4102#comment:61>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to