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:
- Changing the Docs
- Fixing the API (backport f34cfec0fa1243b4a3b9865b961a2360f211f0d8)
Change History (2)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Type: | Uncategorized → Bug |
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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.