Suppose I have a class like
class SomeModel(BaseModel):
class Meta:
# foo = ('one', 'two') # I want to modify this.
def __init__(self, some_arg, *args, **kwargs)
super(SomeModel, self).__init__(*args, **kwargs)
# From here I want to somehow set SomeModel.Meta.foo to some_arg
I create an instance with SomeModel(some_arg=('one', 'two')) and I want to modify SomeModel.Meta.foo as ('one', 'two').
In case anyone is wondering why I want to do this, it’s a problem I currently have in Django with this question.
In Django the
Metainner class no longer exists once the model is created, since the metaclass strips it out. You will need to find another way to do this.