[Django]-Modifying ancestor nested Meta class in descendant

7👍

You could subclass A.Meta:

class B(A):    
    class Meta(A.Meta):
        b = "b parameter"

Now B.Meta inherits all attributes from A.Meta, and all you have to do is declare overrides or new attributes.

Leave a comment