djangosnippets.org: Latest snippets posted by karanlyonshttps://djangosnippets.org/users/karanlyons/2013-08-25T23:18:29.836753-05:00karanlyonsModel Mixin to Save Only Changed Fields
2013-08-25T23:18:29.836753-05:00karanlyonshttps://djangosnippets.org/snippets/2985/<p><strong><a href="https://github.com/karanlyons/django-save-the-change">Improved and Released as Save The Change.</a></strong></p>
<p>Django 1.5 added the <code>update_fields</code> <code>kwarg</code> to <code>Model.save()</code>, which allows the developer to specify that only certain fields should actually be committed to the database. However, Django provides no way to automatically commit only changed fields if they're not specified.</p>
<p>This mixin …</p>
Freely redistributable