Opened 12 years ago
Last modified 12 years ago
#21654 closed Cleanup/optimization
Better name for `Form.errors.as_data()` — at Version 2
| Reported by: | Selwin Ong | Owned by: | nobody |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | loic@… | 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 )
From Django 1.7's release notes:
The dict-like attribute errors now has two new methods as_data() and as_json(). The former returns a dict that maps fields to their original errors, complete with all metadata (error code and params), the latter returns the errors serialized as json.
Is form.errors.as_dict() a better name than form.errors.as_data()?
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Description: | modified (diff) |
|---|---|
| Summary: | Better name for Form.as_data() → Better name for `Form.errors.as_data()` |
| Type: | Uncategorized → Cleanup/optimization |
Note:
See TracTickets
for help on using tickets.
Sorry, I meant
form.errors.as_dict()