Add reasons to auditlog

This commit is contained in:
Rachid Mrad 2024-06-12 22:16:22 -04:00
parent e31c0c9e51
commit 8980d98be9
No known key found for this signature in database
4 changed files with 141 additions and 93 deletions

View file

@ -17,8 +17,6 @@ from .utility.time_stamped_model import TimeStampedModel
from ..utility.email import send_templated_email, EmailSendingError
from itertools import chain
from auditlog.models import AuditlogHistoryField # type: ignore
logger = logging.getLogger(__name__)
@ -35,11 +33,7 @@ class DomainRequest(TimeStampedModel):
]
# https://django-auditlog.readthedocs.io/en/latest/usage.html#object-history
# If we note any performace degradation due to this addition,
# we can query the auditlogs table in admin.py and add the results to
# extra_context in the change_view method for DomainRequestAdmin.
# This is the more straightforward way so trying it first.
history = AuditlogHistoryField()
# history = AuditlogHistoryField()
# Constants for choice fields
class DomainRequestStatus(models.TextChoices):