mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 11:31:07 -05:00
18 lines
384 B
Python
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
|