#7790 closed (fixed)
New validator for ModelAdmin classes should use explicitly declared forms for validation if appropriate
Reported by: | Rozza | Owned by: | Brian Rosner |
---|---|---|---|
Component: | contrib.admin | Version: | newforms-admin |
Severity: | Keywords: | nfa-blocker | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Ticket #5374 Introduced automatic modeladmin validation if you have settings.DEBUG set to True - see r7929
However, this change doesn't handle customized forms for admin because it couples admin form fields 1-1 to the model.
The validator should check against any explicitly declared forms to ensure that the form is valid. Therefore allowing greater flexibility by allowing some decoupling from the model so that admin forms are customizable
Patch including tests attached
Attachments (1)
Change History (6)
by , 16 years ago
Attachment: | validation.py.patch added |
---|
comment:1 by , 16 years ago
Keywords: | nfa-blocker added; BLOCKER newforms admin validation removed |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | assigned → new |
Whoops, that was me above.
comment:3 by , 16 years ago
Status: | new → assigned |
---|
comment:4 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Patch to validation.py and added test cases to modeladmin/models.py