#36995: Improve KeyError message in Form.__getitem__
-----------------------+-----------------------------------------
Reporter: shiva | Type: Uncategorized
Status: new | Component: Uncategorized
Version: 6.0 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------+-----------------------------------------
Currently, Form.__getitem__ raises a KeyError with a message that may be
unclear.
Proposed improvement:
Make the error message more descriptive by explicitly stating that the
field is not found in the form and listing available fields.
I have a working patch with updated tests.
--
Ticket URL: <https://code.djangoproject.com/ticket/36995>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019d0b92cf7d-9868f1dd-9d4f-42c2-8e18-9293fd3e185f-000000%40eu-central-1.amazonses.com.