Opened 12 years ago

Closed 10 years ago

Last modified 9 years ago

#16905 closed New feature (fixed)

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

Reported by: Jeremy Dunck Owned by: nobody
Component: Core (Management commands) Version: dev
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

Description

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.

Change History (7)

comment:1 by Carl Meyer, 12 years ago

Triage Stage: UnreviewedAccepted
Version: 1.3SVN

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

comment:2 by Carl Meyer, 12 years ago

Summary: Custom fields should be included in BaseCommand.validateCustom 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 by Russell Keith-Magee, 10 years ago

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

comment:4 by Russell Keith-Magee <russell@…>, 10 years ago

Resolution: fixed
Status: newclosed

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.

comment:5 by Tim Graham <timograham@…>, 9 years ago

In 67a76500a56d6dbe970126e142e02254dad7dbf3:

Removed support for admin validators per deprecation timeline; refs #16905.

comment:6 by Tim Graham <timograham@…>, 9 years ago

In 0f169098efd099fd7ae13bd8e14b798530d74da7:

Removed BaseCommand.validate() per deprecation timeline; refs #16905.

comment:7 by Markus Holtermann <info@…>, 9 years ago

In 4a5512a61d36e5923ae7de9f61bec042bc8b2d21:

Refs #16905 -- Replaced call to removed method in runserver

Regression introduced in 0f169098efd099fd7ae13bd8e14b798530d74da7

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