I have a following (simplified) class in models.py:
class Order( models.Model ) :
status = models.CharField( max_length = 135, blank = True )
t_status = models.DateTimeField( null = True, blank = True )
user_status = models.ForeignKey( User, null = True, blank = True )
t_created = models.DateTimeField( auto_now_add = True )
t_modified = models.DateTimeField( auto_now = True )
How do I set t_status to be a timestamp (much like t_modified) when the value of t_status changes? Note that t_status can be blank. t_status would normally changed from NULL to the string approved or rejected. user_status is the person that approves or rejects this order.
See django-dirtyfields.