mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 14:51:08 -05:00
15 lines
373 B
Python
15 lines
373 B
Python
# history_tracking/models.py
|
|
from django.db import models
|
|
from simple_history.models import HistoricalRecords
|
|
from .mixins import HistoricalChangeMixin
|
|
|
|
|
|
class HistoricalModel(models.Model):
|
|
"""Abstract base class for models with history tracking"""
|
|
class Meta:
|
|
abstract = True
|
|
|
|
@property
|
|
def _history_model(self):
|
|
return self.history.model
|