diff --git a/ivy/products/models.py b/ivy/products/models.py index 36e025b..aec772c 100644 --- a/ivy/products/models.py +++ b/ivy/products/models.py @@ -1,5 +1,6 @@ from django.db import models from django.utils.timezone import now +from simple_history.models import HistoricalRecords # Create your models here. @@ -7,6 +8,7 @@ class Product(models.Model): name = models.CharField(max_length=20) quantity = models.IntegerField(default=0) date_added = models.DateTimeField(default=now, editable=False) + history = HistoricalRecords() def __str__(self): return self.name