#36813: Convert system checks for max_length and max_digits to __init__()
checks.
-------------------------------------+-------------------------------------
Reporter: Jacob Walls | Owner: Mehraz
Type: | Hossain Rumman
Cleanup/optimization | Status: assigned
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):
I've followed the discussion but am a little skeptical. This introduces
uncertainty about where field validation should be done. Also, field
validation that relies on `connection` can't be done in `Model.__init__()`
so this approach may always be not quite right.
Alternatively, I wonder if this could be addressed by calling
`output_field.check(connection)` somewhere in `Expression`. There is some
complication with this approach because `Field.model` won't be set, so
field checks will have to be aware of that possibility.
--
Ticket URL: <https://code.djangoproject.com/ticket/36813#comment:4>
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 visit
https://groups.google.com/d/msgid/django-updates/0107019b46a1703f-e03bc7cd-9721-4fd1-b524-20f24d6d0d5a-000000%40eu-central-1.amazonses.com.