#35913: About the FormSet class name generated through the formset_factory.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: assigned
Cleanup/optimization |
Component: Forms | Version: 5.1
Severity: Normal | Resolution:
Keywords: FormSet, | Triage Stage:
formset_factory | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):
I agree this is a bit odd.
[https://github.com/django/django/blob/2debd018dbc7aba0b98b4c082bbb1fa1d195a47e/tests/forms_tests/tests/test_formsets.py#L1632-L1636
The test] for the `Formset.__repr__()` uses a form called `Choice` so the
result is `ChoiceFormSet` as expected.
As you pointed out, perhaps to match the documented convention of ending
all form names with "Form" we could consider appending "Set" rather than
"FormSet" if `form.__name__` ends with `Form`. I can't think of any way
this would break backward compatibility, and it might make debugging a
little less confusing.
--
Ticket URL: <https://code.djangoproject.com/ticket/35913#comment:2>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019337979e74-0c1ad7e1-675b-4533-a69b-1fe27d2519df-000000%40eu-central-1.amazonses.com.