Add Leniency to model Meta fields
|Reported by:||karan@…||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)
Changed 3 years ago by anonymous
comment:1 Changed 3 years ago by russellm
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted