Opened 15 years ago
Closed 14 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)
Change History (8)
comment:1 by , 15 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
by , 15 years ago
| Attachment: | 15990.patch added |
|---|
comment:2 by , 15 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:4 by , 14 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
comment:5 by , 14 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 , 14 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.
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.