mirror of
https://github.com/peter-tanner/money-manager.git
synced 2024-11-30 14:20:17 +08:00
14 lines
312 B
Python
14 lines
312 B
Python
from django.db import models
|
|
from simple_history.models import HistoricalRecords
|
|
|
|
|
|
class DeletableModel(models.Model):
|
|
class Meta:
|
|
abstract = True
|
|
|
|
history = HistoricalRecords(inherit=True)
|
|
deleted = models.BooleanField(default=False)
|
|
|
|
def mark_deleted(self):
|
|
self.deleted = True
|