Add Leniency to model Meta fields
|Reported by:||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
(Apologies for the number of things I've likely done wrong submitting this. First time.)
Currently Django raises a TypeError when it comes across unknown options in a model's Meta. This isn't that great for developers looking to add custom options, as it means having to do a bunch of work to keep Django from seeing those options on instantiation (for example).
I think the reason for the TypeError is to guard against typos biting the developer later down the line. With that in mind, I've attached a simple patch to demonstrate an alternate method of handling this case, which would continue to help guarding against typos while also supporting custom Meta options.
Change History (4)
comment:1 Changed 3 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|