mirror of
https://github.com/peter-tanner/money-manager.git
synced 2024-11-30 22:30:18 +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
|