I am using a third party application and i wish to override the save() method of the original model to validate some data.
class CustomState(State):
class Meta:
proxy = True
def save(self, *args, **kwargs):
print('hellooo in save method of state')
super(State, self).save(*args, **kwargs)
However the code snippet above does not run.
Therefore my question is is there a way to override the save method of a model ? Or if thats not possible , is there a way to add in validation before the third party model instance is created?