Opened 5 years ago

Closed 5 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:

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 5 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 5 years ago by Aymeric Augustin

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
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.

Changed 5 years ago by Aymeric Augustin

Attachment: 15990.patch added

comment:2 Changed 5 years ago by Aymeric Augustin

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 Changed 5 years ago by Jeff Blaine

Much clearer.

comment:4 Changed 5 years ago by dmclain

Triage Stage: AcceptedReady for checkin

comment:5 Changed 5 years ago by anonymous

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

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

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