Code

Opened 2 years ago

Closed 2 years ago

#18610 closed New feature (duplicate)

create internal API for model field validation

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

Description

Not to be confused with model instance validation.

Currently a model's definition is validated by admin script commands through a function located in django/core/management/validation.py

This utility checks the sanity and integrity of various field definitions on the model, and outputs errors to stdout for display by the command.

There are useful reasons to have a programatic API to this model definition validation - including during app-loading

There may be other 3rd party uses, but the primary use case and inspiration for this ticket, is to allow this validation to occur at app loading time, rather than syncdb time

Attachments (0)

Change History (1)

comment:1 Changed 2 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

I'm going to call this a duplicate of #16905. It's also related to #8579, and the eternally proposed (but never accepted Summer of Code project)

Needless to say, I'm +1.

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.