You can override the save method and not call super if you want. This will be a fairly easy way to do this.
# blatantly ripped the save from another answer, since I forgot to save original model def save(self, *args, **kwargs): if self.id is None: super(ModelName, self).save(*args, **kwargs) def delete(self, *args, **kwargs): return
You should probably also throw an exception if an attempt to delete or update occurs instead of simply returning. You want to tell the user what is happening - that the behavior is invalid.
Josh Smeaton Dec 02 '10 at 10:50 2010-12-02 10:50
source share