I want to override save method in django.
I am using Django REST framework so basically serializer handles all saving of model.
def save(self, split=True, **kwargs):
if split:
result = super(Entry,self).save(**kwargs)
logger.warn(result)
logger.error(self)
#tasks.split_entry(self)
else:
super(Entry,self).save(**kwargs)
Now I want to pass the object being saved to my tasks but I am not sure if self is object or result is object.
I don't want to interrupt the process because I think django rest needs to get that saved object to return to request. So I am confused how to use super here.
If I do the above process I can't see any logging. I think it skips them.
Entryobject is inself, if you want keep the log and execute the save normally (and you don't want to use signals), try to executesupermethod at the end.superjust where it is.