Opened 3 years ago

Closed 3 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 Changed 3 years ago by Tim Graham

Summary: Misleading examples of form clean methodAdd a versionchanged note that returning cleaned_data is no longer required in clean()
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

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.

comment:2 Changed 3 years ago by Daniele Procida

Easy pickings: set
Keywords: afraid-to-commit added
Owner: changed from nobody to Daniele Procida
Status: newassigned

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 Changed 3 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In ebfe42d018b1268969238a5b90bfb5fe46d0d44f:

Fixed #21009 -- Added a versionchanged note regarding changes to clean().

refs [fb1dd6b13a] and [1c4a9bd9ad1]

Note: See TracTickets for help on using tickets.
Back to Top