Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#25777 closed New feature (wontfix)

Django admin/views don't expect forms to fail after validation

Reported by: Vlastimil Zíma Owned by: nobody
Component: Forms Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Django assumes that all input data in forms can be validated by Form.is_valid() which is not true. Database contraints, e.g. unique, can fail even though they are checked. An application may require communication with other servers while processing data which can lead to errors.

Both Django admin and generic form views should expect that save may fail despite the validation and provide a way to handle those errors easily, e.g. expect ValidationError can be raised by and etc.

Change History (2)

comment:1 Changed 6 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

This would be a fundamental change in the design of Django and should first be discussed on the DevelopersMailingList to find a consensus. Thanks!

comment:2 Changed 6 years ago by Tim Graham

Component: UncategorizedForms
Type: UncategorizedNew feature
Note: See TracTickets for help on using tickets.
Back to Top