#35872: Add error message when invalid ModelForm Meta attributes are set
-----------------------------+--------------------------------------
Reporter: jernwerber | Owner: jernwerber
Type: New feature | Status: closed
Component: Forms | Version: 5.0
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------+--------------------------------------
Comment (by jernwerber):
Replying to [comment:2 Carlton Gibson]:
> Worth noting that #5793 is a long-standing ticket to **allow** custom
Model Meta attributes… — it’s not monotonic here.
Oh wow, long-standing indeed (opened 17 years ago)! And it even references
ModelForm's `Meta` class, ''somewhat'' more recently at 8 years ago. My
(admittedly limited) understanding of Django's architecture was consistent
with the first comment on that ticket, namely that these `Meta` classes
are go-betweens for private parts of the API since the `Meta` class itself
is essentially ignored once the corresponding attributes have been set on
the ModelForm. The discussion on Model's `Meta` attributes still seems to
support validation of the attributes, so even if custom attributes were to
be allowed, I think one would still expect an error of some sort to be
raised should an invalid attribute (however that's determined) be set.
--
Ticket URL: <
https://code.djangoproject.com/ticket/35872#comment:3>