Why is the Meta Django model inner class limited?

Is there a good reason why you cannot add custom attributes to the Django model's Meta inner class? The only thing I can think of is to catch the wrong configurations.

This thread shows how you can get around it, but I wonder if there are other reasons for this limitation.

+5
source share
1 answer

Options, a class that processes Metaand actually adds an attribute _metato the model, passes through the attributes Metain the loop and uses setattrfor itself to transfer data. This process will fail if the Metaattribute is missing Meta.

, , .

+3

All Articles