8👍
You can do that with:
if 'value' in form.changed_data:
where:
form
is yourAnnouncementForm
and has been validated first (form.is_valid
)value
is the field name
Since you’re using CBV, you can put the logic in form_valid
method, to make sure all the data is properly validated (unless you have a different use case)
Source:stackexchange.com