Files
thrillwiki_django_no_react/history_tracking/models.py
2024-11-03 20:21:39 +00:00

18 lines
384 B
Python

# history_tracking/models.py
from django.db import models
from simple_history.models import HistoricalRecords
from .mixins import HistoricalChangeMixin
class Park(models.Model):
name = models.CharField(max_length=200)
# ... other fields ...
history = HistoricalRecords()
@property
def _history_model(self):
return self.history.model
# Apply the mixin