Skip to content

Instantly share code, notes, and snippets.

View bradreardon's full-sized avatar

Brad Reardon bradreardon

View GitHub Profile
@bradreardon
bradreardon / track_data.py
Last active December 9, 2020 22:49 — forked from dcramer/track_data.py
Tracking changes on properties in Django -- fixed for deferred fields
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.
>>> @track_data('name')

Keybase proof

I hereby claim:

  • I am bradreardon on github.
  • I am bradreardon (https://keybase.io/bradreardon) on keybase.
  • I have a public key ASBLFlqRggjL76Y76XL52Qx9bL7lQ3bR9S3FqcDZUqtKkgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am bradreardon on github.
  • I am bradreardon (https://keybase.io/bradreardon) on keybase.
  • I have a public key ASBgxCRbdw8Odb72oHRsPfOzwUVttfWlAa5CN27MYnvnpwo

To claim this, I am signing this object:

/*
Refined T-Square
Author: Ryan Ashcraft
URI: http://ryanashcraft.me/
Version: 1.1.4
09/08/2011 (1.1) - initial release
09/12/2011 (1.1.1)- fix "My Active Sites" button and other bugs
09/16/2011 (1.1.2) - fix "my Active Sites" popup, table-row backgrounds, and other bugs