#24541: Clarify ModelFromsets handling of initial data --------------------------------------+------------------------------------ Reporter: codingjoe | Owner: nobody Type: Cleanup/optimization | Status: new Component: Documentation | Version: master Severity: Normal | Resolution: Keywords: modelformset | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------ Changes (by timgraham):
* type: Uncategorized => Cleanup/optimization * has_patch: 0 => 1 * component: Forms => Documentation * stage: Unreviewed => Accepted Comment: Accepting as a documentation issue. As I said before, I don't think changing the behavior is acceptable given backwards compatibility. For example, your patch assumes that the initial data includes all fields of the model. Since unchanged formsets aren't validated, saving would fail with a database `IntegrityError` if a required field is omitted. Let me know if anything is unclear or if you think something additional should be added to the documentation. I've attached a proposed patch. -- Ticket URL: <https://code.djangoproject.com/ticket/24541#comment:13> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.55a695643186eb72e2033af7a8c28a50%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.