Opened 13 years ago

Closed 13 years ago

#15990 closed Bug (fixed)

Broken sentence in modelforms topic doc

Reported by: Jeff Blaine Owned by: nobody
Component: Documentation Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Error in http://docs.djangoproject.com/en/1.3/topics/forms/modelforms/

This makes no sense that can figure out:

The first time you call is_valid() or access the errors attribute of a ModelForm has always triggered form validation, but as of Django 1.2, it will also trigger model validation.

Attachments (1)

15990.patch (993 bytes ) - added by Aymeric Augustin 13 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

The sentence makes sense for me: $ACTION has always done $FOO, and since Django >= 1.2, it also does $BAR.

But it's needlessly complex.

by Aymeric Augustin, 13 years ago

Attachment: 15990.patch added

comment:2 by Aymeric Augustin, 13 years ago

Has patch: set

Attached patch proposes a simplified wording.

The fact that validation only happens the first time either is_valid is called or errors is accessed is no longer stated explicitly—I think it is obvious in the context.

comment:3 by Jeff Blaine, 13 years ago

Much clearer.

comment:4 by dmclain, 13 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by anonymous, 13 years ago

I don't think the sentance that aaugustin proposed has the same meaning as the original. it should be:

"As of Django 1.2, the model validation is triggered in addition to the default behavior of older versions (triggering the form validation) by calling is_valid() or accessing the errors attribute of the ModelForm."

or

"As of Django 1.2 calling is_valid() or accessing the errors attribute of the ModelForm will trigger model validation in addition to form validation."

comment:6 by Tim Graham, 13 years ago

Since we should technically be removing the versionadded/changed tags that reference 1.2 in the 1.4 docs, I'm going to remove the reference to Django 1.2 here which will simplify things.

comment:7 by Tim Graham, 13 years ago

Resolution: fixed
Status: newclosed

In [16329]:

Fixed #15990 - Simplified a sentence regarding form validation for ModelForms; thanks jblaine for the suggestion.

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