#27654: Propogate alters_data value to subclasses
------------------------------------------------+------------------------
               Reporter:  vinay karanam         |          Owner:  nobody
                   Type:  Cleanup/optimization  |         Status:  new
              Component:  Uncategorized         |        Version:  1.10
               Severity:  Normal                |       Keywords:
           Triage Stage:  Unreviewed            |      Has patch:  1
    Needs documentation:  0                     |    Needs tests:  0
Patch needs improvement:  0                     |  Easy pickings:  0
                  UI/UX:  0                     |
------------------------------------------------+------------------------
 Current implementation to prevent data changes within templates relies on
 the attribute alters_data = True.

 By default this is set for all Model, QuerySet and ModelForm methods that
 can alter data.

 But if someone overrides these methods, they need to explicitly set this
 attribute again.
 It is common to override save method and not set this attribute.

 Even a lot of popular third-party packages end up making this mistake.

 These classes need to make sure that the attribute value is set for their
 subclasses methods if not explicitly overwritten.

--
Ticket URL: <https://code.djangoproject.com/ticket/27654>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.b25547d6450a56182c23191dd60a0d3b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to