Kaydet (Commit) 571ab44e authored tarafından Bruno Furtado's avatar Bruno Furtado Kaydeden (comit) Mariusz Felisiak

Fixed #30321 -- Added example of changed_data to forms docs.

üst f944cb3d
......@@ -299,6 +299,8 @@ provided in :attr:`~Form.initial`. It returns an empty list if no data differs.
>>> f = ContactForm(request.POST, initial=data)
>>> if f.has_changed():
... print("The following fields changed: %s" % ", ".join(f.changed_data))
>>> f.changed_data
['subject', 'message']
Accessing the fields from the form
==================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment