changing save method in djnago code example
Example: how to override save method in django
def save(self, *args, **kwargs):
if not self.id:
# Object is a new instance
return super(Model, self).save(*args, **kwargs)
def save(self, *args, **kwargs):
if not self.id:
# Object is a new instance
return super(Model, self).save(*args, **kwargs)