#26142: Provide a way for model formsets to disallow new object creation
-----------------------------+------------------------------------
Reporter: timgraham | Owner: Mortal
Type: New feature | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Comment (by timgraham):
I don't think `max_num=0` allows editing existing instances. Such a
formset will fail with "Please submit 0 or fewer forms." won't it?
The idea I had to try to accomplish this is setting
`max_num=len(queryset)` but I'm attaching a regression test demonstrating
that an extra instance is created if the user edits the `'form-
INITIAL_FORMS'` form value.
--
Ticket URL: <https://code.djangoproject.com/ticket/26142#comment:7>
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/067.dad2ffded9bdbd846f2a9285b80999a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.