Opened 4 years ago

Closed 4 years ago

#15990 closed Bug (fixed)

Broken sentence in modelforms topic doc

Reported by: jblaine 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:


Error in

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 aaugustin 4 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 4 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 4 years ago by aaugustin

comment:2 Changed 4 years ago by aaugustin

  • 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 4 years ago by jblaine

Much clearer.

comment:4 Changed 4 years ago by dmclain

  • Triage Stage changed from Accepted to Ready for checkin

comment:5 Changed 4 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."


"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 4 years ago by timo

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 4 years ago by timo

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

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