#25594: Difficult to customize model field default_validators and have them
used on
both model and form fields
-------------------------------------+-------------------------------------
Reporter: Marcin Nowak | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Arthur Pemberton):
My ticket was marked as a duplicate of this, I'm not sure I agree, but
I'll re-post here:
Example URL: "myscheme://server/group-name/item-name"
Problem 1: `models.URLField` needs to be subclassed to change allowed
`schemes`
Problem 2: `forms.URLField` needs to be subclassed to change allowed
`schemes`
Problem 3: `validators.URLValidator` needs to be subclassed to change
`regex` to allow `netloc` that is a hostname without a domain ad TLD
At the very least, making these changes should be documented better. The
message accompanying ValidationError gives no hint as to the source issue
with a URL.
--
Ticket URL: <https://code.djangoproject.com/ticket/25594#comment:5>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.e53f5f0a369e0f4abaee3137e441d9e7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.