#13949 closed (fixed)
readonly fields can't be modified via cleaned_data in forms
Reported by: | alk | Owned by: | elbarto |
---|---|---|---|
Component: | Documentation | Version: | 1.2 |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
if you make a model with readonly fields, the value of that field can't be set in a clean() validator in that model's form - this isn't mentioned in the documentation anywhere as far as I can see, should be added I think
Attachments (1)
Change History (6)
comment:1 by , 14 years ago
Description: | modified (diff) |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 14 years ago
Owner: | changed from | to
---|
by , 14 years ago
Attachment: | patch.diff added |
---|
comment:3 by , 14 years ago
Has patch: | set |
---|
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
It's true that the data for read-only fields are not available in cleaned_data. This is because read-only fields are displayed as text rather than as input elements, and thus are not posted back to the server, and so are not in the data that gets cleaned.
Mentioning this fact couldn't hurt.