On 12/3/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote: > > > Didn't see one so I opened one, #6117. From a brief look it seems to me > the > > way to determine what has changed would be to compare the cleaned_data > > values for fields to the corresponding initial values? If you think > that's > > the right general approach, I could take a look at working up a patch. > (Or > > if there's a different approach that should be taken, you could point me > in > > that direction.) > > So I've thought a little bit about putting access to "what's changed" > in the BaseModelForm class. It would be a very nice feature to have, > it could be lazy, and the modelform already has access to the original > object *and* the form data. No idea what the API would look like > though. If you want to propose something, I'll certainly participate > in the discussion.
Ah, you'd like to push the responsibility for reporting changes down into the form itself, which could be generally useful outside of admin. Sounds good. I'll try to find time to look into it and see if I can't come up with a proposed API. I suppose it *could* go in BaseForm, but the pattern there seems to be > "use initial, or use data, but not both". Anyone want to register an opinion on how deep in the hierarchy this should go? Seems to me it could be generally useful for BaseForm to be able to report what fields' cleaned values are different from what was specified as initial data. Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---