Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#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: UI/UX:


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) (2.3 KB) - added by Rozza 8 years ago.
Patch to and added test cases to modeladmin/

Download all attachments as: .zip

Change History (6)

Changed 8 years ago by Rozza

Attachment: added

Patch to and added test cases to modeladmin/

comment:1 Changed 8 years ago by anonymous

Keywords: nfa-blocker added; BLOCKER newforms admin validation removed
Needs documentation: unset
Needs tests: unset
Owner: changed from nobody to anonymous
Patch needs improvement: unset
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 Changed 8 years ago by Brian Rosner

Owner: changed from anonymous to Brian Rosner
Status: assignednew

Whoops, that was me above.

comment:3 Changed 8 years ago by Brian Rosner

Status: newassigned

comment:4 Changed 8 years ago by Brian Rosner

Resolution: fixed
Status: assignedclosed

(In [7943]) newforms-admin: Fixed #7790 -- Check form fields, not model fields when testing for field existence in fields and fieldsets. Thanks Rozza for catching this and writing an initial patch.

post-commit mishap ;)

comment:5 Changed 5 years ago by Jacob

milestone: 1.0 alpha

Milestone 1.0 alpha deleted

Note: See TracTickets for help on using tickets.
Back to Top