我想在Django中创建两个模型
class BlogPost(models.Model):
body = models.TextField()
delete = models.BooleanField(default=True)
def save(self, *args, **args):
if self.delete():
# move object to Post Archive
class BlogPostArchive(BlogPost):
date_deleted = models.DateTimeField(auto_now_add=True)
如何定义将需要删除的BlogPost对象迁移到存档中的方法?