Opened 5 years ago

Closed 5 years ago

#28788 closed New feature (wontfix)

Add support for Model.clean_<fieldname>

Reported by: Jonas Haag Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Someday/Maybe
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Form.clean_<fieldname> should have an equivalent in models, Model.clean_<fieldname>.

I've implemented a proof of concept here:

I'm not sure about backwards compatibility; we certainly don't want surprising calls to model methods that are called clean_XXX by coincidence.

Change History (2)

comment:1 Changed 5 years ago by Tim Graham

Triage Stage: UnreviewedSomeday/Maybe

At first glance, my thought is "why duplicate the field validators API"? A consensus on the DevelopersMailingList to make this change is needed.

comment:2 Changed 5 years ago by Tim Graham

Resolution: wontfix
Status: newclosed

The django-developers discussion didn't yield a consensus about this.

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