#30581: Allow constraints to be used for validation (in Python)
-------------------------------------+-------------------------------------
Reporter: Carlton Gibson | Owner: Sanskar
| Jaiswal
Type: New feature | Status: assigned
Component: Database layer | Version: 2.2
(models, ORM) |
Severity: Normal | Resolution:
Keywords: constraints, | Triage Stage: Accepted
validation |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Simon Charette):
FWIW I started exploring the above idea and published
[https://github.com/django/django/compare/master...charettes:constraints-
validation my changes] which pass most of the test suite but still require
a bit of polishing.
In the light of the current barrage of issues related to checks that are
not `UniqueConstraint` aware I think the `Constraint.auto_created`
creation by `Field.unique` and `Model.Meta.unique_together` has merits as
it would allow all of the ''unicity'' checks to be performed against
`_meta.constraints` (or the newly added `total_unique_constraints`)
instead of combining the three APIs all over the place.
--
Ticket URL: <https://code.djangoproject.com/ticket/30581#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.5fa6933273c34abae38863c027cf947b%40djangoproject.com.