tags:

views:

95

answers:

2

I have the following code in my Django application:

if 'book' in authorForm.changed_data:
   #Do something here...

I realize Django can tell me which values have changed in my form by utilizing the "changed_data" list object, but I'd like to know the new values of the fields that have changed.

Any thoughts?

+2  A: 

Hmm... Try this:

if authorForm.is_valid() and 'book' in authorForm.changed_data:
    new_value = authorForm.cleaned_data['book']
Alex Koshelev
The short answer to my original question is "No". However, your answer is appreciated and I'll give you credit. :)
Huuuze
A: 

The short answer to my original question is "No".

Huuuze