Code

Opened 5 months ago

Closed 2 weeks ago

Last modified 2 weeks ago

#21942 closed Cleanup/optimization (fixed)

document Form.clean() in "Forms API" docs

Reported by: cjerdonek Owned by: lkitchner
Component: Documentation Version: 1.6
Severity: Normal Keywords: forms,clean,validation
Cc: chris.jerdonek@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

Currently, the "Forms API" section of the Django docs (and in particular the Using forms to validate data section of that page), does not document Form.clean(), though the Form.add_error() documentation in that page references it.

There is some documentation about Form.clean() in the Form and field validation page, so perhaps the Forms API docs can link there for its information (and/or vice versa).

Attachments (0)

Change History (11)

comment:1 Changed 5 months ago by cjerdonek

  • Cc chris.jerdonek@… added
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 months ago by timo

  • Triage Stage changed from Unreviewed to Accepted

Yes, I would add it under "Using forms to validate data" and move ".. method:: django.forms.Form.clean()" from the "Cleaning and validating fields that depend on each other" section of ref/forms/validation.txt, but then link to that section from the new text in the API doc.

comment:3 Changed 5 months ago by lkitchner

  • Owner changed from nobody to lkitchner
  • Status changed from new to assigned

comment:4 Changed 5 months ago by lkitchner

  • Triage Stage changed from Accepted to Ready for checkin

I have submitted this fix to the GitHub repo. HTML generated with no errors on Ubuntu.

comment:5 Changed 5 months ago by bmispelon

  • Triage Stage changed from Ready for checkin to Accepted

The "ready for checkin" status is for when your patch has been reviewed and is ready to be checked in (see relevant documentation [1]).

I cannot see your fix anywhere: did you submit it as a pull request?

When you have a pull request, please put the link as a comment on this ticket as check the "has patch" checkbox.

Thanks.

[1] https://docs.djangoproject.com/en/1.6/internals/contributing/triaging-tickets/#triage-stages

comment:6 Changed 5 months ago by lkitchner

  • Has patch set

comment:7 Changed 5 months ago by timo

  • Patch needs improvement set

Comments for improvement on the PR.

comment:8 Changed 5 months ago by lkitchner

I've made the discussed changes from pull 2318 and have made a new pull request.
https://github.com/django/django/pull/2334

comment:9 Changed 5 months ago by cjerdonek

I made a suggestion on the first pull request that doesn't seem to be reflected in the second one (nor was there a response): https://github.com/django/django/pull/2318#discussion_r9840517

comment:10 Changed 2 weeks ago by Tim Graham <timograham@…>

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

In 874053edf92c02e1ab155bdf7491b08f9863dce8:

Fixed #21942 -- Moved Form.clean() to form API docs.

Thanks cjerdonek for the suggestion.

comment:11 Changed 2 weeks ago by Tim Graham <timograham@…>

In af9949f4efe5c2a6fd51b925fe96e4a6644e2799:

[1.7.x] Fixed #21942 -- Moved Form.clean() to form API docs.

Thanks cjerdonek for the suggestion.

Backport of 874053edf9 from master

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.