Opened 11 years ago
Closed 11 years ago
#21009 closed Cleanup/optimization (fixed)
Add a versionchanged note that returning cleaned_data is no longer required in clean()
Reported by: | anonymous | Owned by: | Daniele Procida |
---|---|---|---|
Component: | Documentation | Version: | 1.5 |
Severity: | Normal | Keywords: | afraid-to-commit |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
The two examples of a form clean method at the very bottom of https://docs.djangoproject.com/en/dev/ref/forms/validation/ should make it clear that the cleaned_data dict needs to be returned at the end of the method. This can be fixed by simply adding the line "return cleaned_data" at the end of each function.
Change History (3)
comment:1 by , 11 years ago
Summary: | Misleading examples of form clean method → Add a versionchanged note that returning cleaned_data is no longer required in clean() |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 11 years ago
Easy pickings: | set |
---|---|
Keywords: | afraid-to-commit added |
Owner: | changed from | to
Status: | new → assigned |
I would like to reserve this ticket for first-time committers who take
part in the [http://www.djangocon.us/schedule/presentation/7/ Don't be
afraid to commit tutorial] and the sprints at [http://djangocon.us/
DjangoCon US 2013] in September.
However, if you want to tackle this ticket before then, please don't
hesitate. Feel free to re-assign it to yourself and do whatever you like
to it.
comment:3 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This has changed in the development version of Django (see [fb1dd6b13a] and [1c4a9bd9ad1]) so that returning
cleaned_data
is no longer required, however, it would be good to add a versionchanged note about that in this section.