djangosnippets.org: Latest snippets posted by IzzaddinRuhulessinhttps://djangosnippets.org/users/IzzaddinRuhulessin/2010-11-30T10:37:46.369099-06:00IzzaddinRuhulessinCompare two instances of the same model
2010-11-30T10:37:46.369099-06:00IzzaddinRuhulessinhttps://djangosnippets.org/snippets/2281/<p>This compares two objects (of the same model) and returns a tuple containing dictionaries with the changed attributes. Note that ALL attributes are run through comparison, so if you are modifying non-field attributes at runtime, these will also be included.</p>
<p>Excluded keys is a tuple containing the names if attributes …</p>
Freely redistributable