djangosnippets.org: Latest snippets tagged with 'comparison'https://djangosnippets.org/tags/comparison/2013-11-23T16:26:25.195111-06:00How to compare two versions?
2013-11-23T16:26:25.195111-06:00RafRafhttps://djangosnippets.org/snippets/3004/<p>ver_cmp('1.6.2', '1.6')</p>
Freely redistributableCompare 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 redistributabletypo_comparison
2009-08-23T06:03:13.613111-05:00rogushttps://djangosnippets.org/snippets/1696/<p>This is simple validation weather a string is close enough to what we want. First param is keyword we are comparing to Second is user's input and third is tolerance level. Its very rudimentary. I have my mind fixed upon some imperfections. I am trying to make it good for …</p>
Freely redistributablereally_equals
2007-05-11T15:42:55.273974-05:00zeeghttps://djangosnippets.org/snippets/228/<p>Lets you compare two objects based on fields</p>
Freely redistributable