How to detect changes in a model's fields before save() ?

2008-10-10 Thread zhango
I'm overriding a model's save() method, and I want to detect changes in values for some of the model's fields (i.e. differences between the unsaved instance's values for some fields, and the values for those same fields currently in the database and about to be overwritten). Is it possible to do t

Re: How to detect changes in a model's fields before save() ?

2008-10-13 Thread zhango
e prior version, compared its values with those of the still-unsaved self instance. Seems to work just fine. On Oct 10, 8:59 pm, zhango <[EMAIL PROTECTED]> wrote: > I'm overriding a model's save() method, and I want to detect changes > in values for some of the model&#

Re: How to detect changes in a model's fields before save() ?

2008-10-13 Thread zhango
Bruno - yes, your solution is even better as it avoids a database lookup. Thank you! On Oct 12, 4:06 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 11 oct, 02:59, zhango <[EMAIL PROTECTED]> wrote: > > > I'm overriding a model's save() method, and I wa