Opened 11 years ago

Closed 11 years ago

#21468 closed Bug (fixed)

Django 1.5: Docs on ModelForm validation are wrong

Reported by: direx Owned by: nobody
Component: Documentation Version: 1.5
Severity: Normal Keywords: model form validation
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

From docs/topics/forms/modelforms.txt#validation-on-a-modelform:

Model validation (Model.full_clean()) is triggered from within the form validation step, right after the form’s clean() method is called.

This is wrong. Prior to Django 1.6 only Model.clean() is called by BaseModelForm._post_clean().

There are two options here:

Change History (2)

comment:1 by Baptiste Mispelon, 11 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

Hi,

Indeed, it seems that some documentation fixes were backported with 3860d5e8f814e26baf4deee9258392cd34a4b456 and they contain sentences that only apply to later versions of Django.

The first option is the way to go here, since new features don't normally get backported (only sever bug fixes and security-related patches are).

Thanks.

comment:2 by Baptiste Mispelon <bmispelon@…>, 11 years ago

Resolution: fixed
Status: newclosed

In ed8814b24a18cecdeb2631281bceb2f8432a2546:

Fixed #21468 -- Removed a ModelForm bit that doesn't apply to 1.5.x.

The bit was incorrectly backported with 3860d5e8f814e26baf4deee9258392cd34a4b456.

Thanks to trac user direx for the report and to Loic Bistuer
for his help.

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