mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 08:31:08 -05:00
Refactor model imports and update admin classes to use pghistory for historical tracking; replace HistoricalModel with TrackedModel in relevant models
This commit is contained in:
@@ -10,12 +10,12 @@ from django.contrib.auth.base_user import AbstractBaseUser
|
||||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.utils.text import slugify
|
||||
import pghistory
|
||||
from core.models import HistoricalModel
|
||||
from history_tracking.models import TrackedModel
|
||||
|
||||
UserType = Union[AbstractBaseUser, AnonymousUser]
|
||||
|
||||
@pghistory.track() # Track all changes by default
|
||||
class EditSubmission(HistoricalModel):
|
||||
class EditSubmission(TrackedModel):
|
||||
STATUS_CHOICES = [
|
||||
("PENDING", "Pending"),
|
||||
("APPROVED", "Approved"),
|
||||
@@ -199,7 +199,7 @@ class EditSubmission(HistoricalModel):
|
||||
self.save()
|
||||
|
||||
@pghistory.track() # Track all changes by default
|
||||
class PhotoSubmission(HistoricalModel):
|
||||
class PhotoSubmission(TrackedModel):
|
||||
STATUS_CHOICES = [
|
||||
("PENDING", "Pending"),
|
||||
("APPROVED", "Approved"),
|
||||
|
||||
Reference in New Issue
Block a user