Opened 3 years ago

Closed 3 months ago

#16905 closed New feature (fixed)

Custom fields and apps should have a way to hook into BaseCommand.validate

Reported by: jdunck Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Right now, management.validation.get_validation_errors has a long chain of elif isinstance's for built-in fields.

It should be possible for custom fields to participate in this model-declaration validation phase.

Attachments (0)

Change History (4)

comment:1 Changed 3 years ago by carljm

  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.3 to SVN

Definitely. Both #3055 and #8579 are waiting on this.

comment:2 Changed 3 years ago by carljm

  • Summary changed from Custom fields should be included in BaseCommand.validate to Custom fields and apps should have a way to hook into BaseCommand.validate

Not only custom fields, but also things that aren't fields at all - e.g. #8579.

comment:3 Changed 3 months ago by russellm

A pull request to address this issue is now available, and is a candidate for the 1.7 release.

comment:4 Changed 3 months ago by Russell Keith-Magee <russell@…>

  • Resolution set to fixed
  • Status changed from new to closed

In d818e0c9b2b88276cc499974f9eee893170bf0a8:

Fixed #16905 -- Added extensible checks (nee validation) framework

This is the result of Christopher Medrela's 2013 Summer of Code project.

Thanks also to Preston Holmes, Tim Graham, Anssi Kääriäinen, Florian
Apolloner, and Alex Gaynor for review notes along the way.

Also: Fixes #8579, fixes #3055, fixes #19844.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.