Re: avoiding a save when the form contains no new data

2009-02-25 Thread Margie
Hi Alex, Thanks for your reply. Yes, I had found and experimented with both has_changed() and changed_data(), but I found that they don't deal as I'd like with my case where my form contains fields that are not in the model. IE, using the Book example, if I have model Book(models.Model):

Re: avoiding a save when the form contains no new data

2009-02-25 Thread Alex Gaynor
On Wed, Feb 25, 2009 at 7:55 PM, Margie wrote: > > Say I create a form that reflects the current state of an object. The > user can edit that form, and when they click 'save', I get back the > new, possibly edited, values via the POST. In my POST code I do > something

avoiding a save when the form contains no new data

2009-02-25 Thread Margie
Say I create a form that reflects the current state of an object. The user can edit that form, and when they click 'save', I get back the new, possibly edited, values via the POST. In my POST code I do something like this: postDict = request.POST.copy() bookForm = BookForm(postDict,