#21009 closed Cleanup/optimization (fixed)

Add a versionchanged note that returning cleaned_data is no longer required in clean()

Reported by: anonymous Owned by: EvilDMP
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 20 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from Misleading examples of form clean method to Add a versionchanged note that returning cleaned_data is no longer required in clean()
  • Triage Stage changed from Unreviewed to Accepted
  • Type changed from Uncategorized to Cleanup/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 20 months ago by EvilDMP

  • Easy pickings set
  • Keywords afraid-to-commit added
  • Owner changed from nobody to EvilDMP
  • Status changed from new to 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 Changed 20 months ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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