diff options
| author | Bruno Furtado <brunofurtadoc@gmail.com> | 2019-04-09 22:52:33 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-04-09 22:52:33 +0200 |
| commit | 571ab44e8a8936014c22e7eebe4948d9611fd7ce (patch) | |
| tree | 198c5703503292a470a39c57b2d575001b3ec04e /docs/ref/forms/api.txt | |
| parent | f944cb3d3bc17a97216f8990ff3bb4bee14b6f6b (diff) | |
Fixed #30321 -- Added example of changed_data to forms docs.
Diffstat (limited to 'docs/ref/forms/api.txt')
| -rw-r--r-- | docs/ref/forms/api.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt index 3b0db3a79a..70f455fefe 100644 --- a/docs/ref/forms/api.txt +++ b/docs/ref/forms/api.txt @@ -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 ================================== |
