Skip to content

Instantly share code, notes, and snippets.

View thomlinton's full-sized avatar

Thom Linton thomlinton

  • Portland State University
  • Portland, OR
View GitHub Profile
@thomlinton
thomlinton / track_data.py
Created November 23, 2011 07:25 — forked from dcramer/track_data.py
Tracking changes on properties in Django
from django.db.models.signals import post_init
def track_data(*fields):
"""
Tracks property changes on a model instance.
The changed list of properties is refreshed on model initialization
and save.