I have a simple DB schema:
class testModel(models.Model):
modified_by = models.CharField(max_length=50, verbose_name="Modified by")
modify_date = models.DateTimeField(auto_now_add=True, auto_now=False)
week = models.DateField( verbose_name="Week date" )
type = models.CharField(max_length=10, verbose_name="Type")
value = models.CharField(max_length=4, verbose_name="value")
def __unicode__(self):
return str(self.type)
what i want to do is save each action into second table , e.g. testModel_history.
I know I can create such table and import record during each change in first table, but I would like to ask you whether is there the better way to do this ?
Thanks in advance,