[Django] #21009: Misleading examples of form clean method

1 view
Skip to first unread message

Django

unread,
Aug 31, 2013, 4:29:34 PM8/31/13
to django-...@googlegroups.com
#21009: Misleading examples of form clean method
-------------------------------+--------------------
Reporter: anonymous | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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.

--
Ticket URL: <https://code.djangoproject.com/ticket/21009>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 31, 2013, 7:52:13 PM8/31/13
to django-...@googlegroups.com
#21009: Add a versionchanged note that returning cleaned_data is no longer required
in clean()
--------------------------------------+------------------------------------
Reporter: anonymous | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timo):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/21009#comment:1>

Django

unread,
Sep 2, 2013, 10:02:16 AM9/2/13
to django-...@googlegroups.com
#21009: Add a versionchanged note that returning cleaned_data is no longer required
in clean()
--------------------------------------+------------------------------------
Reporter: anonymous | Owner: EvilDMP
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.5
Severity: Normal | Resolution:
Keywords: afraid-to-commit | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by EvilDMP):

* status: new => assigned
* keywords: => afraid-to-commit
* owner: nobody => EvilDMP
* easy: 0 => 1


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/21009#comment:2>

Django

unread,
Sep 5, 2013, 6:31:52 AM9/5/13
to django-...@googlegroups.com
#21009: Add a versionchanged note that returning cleaned_data is no longer required
in clean()
--------------------------------------+------------------------------------
Reporter: anonymous | Owner: EvilDMP
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.5
Severity: Normal | Resolution: fixed

Keywords: afraid-to-commit | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ebfe42d018b1268969238a5b90bfb5fe46d0d44f"]:
{{{
#!CommitTicketReference repository=""
revision="ebfe42d018b1268969238a5b90bfb5fe46d0d44f"
Fixed #21009 -- Added a versionchanged note regarding changes to clean().

refs [fb1dd6b13a] and [1c4a9bd9ad1]
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/21009#comment:3>

Reply all
Reply to author
Forward
0 new messages