Opened 10 years ago

Last modified 10 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 Simon Charette)

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 Selwin Ong, 10 years ago

Sorry, I meant form.errors.as_dict()

comment:2 by Simon Charette, 10 years ago

Description: modified (diff)
Summary: Better name for Form.as_data()Better name for `Form.errors.as_data()`
Type: UncategorizedCleanup/optimization
Note: See TracTickets for help on using tickets.
Back to Top