[Django] #29311: URLField is too strict, doesn't allow other valid URLs

5 views
Skip to first unread message

Django

unread,
Apr 10, 2018, 5:02:07 PM4/10/18
to django-...@googlegroups.com
#29311: URLField is too strict, doesn't allow other valid URLs
--------------------------------------------+------------------------
Reporter: Arthur Pemberton | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
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/29311>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 11, 2018, 11:10:48 AM4/11/18
to django-...@googlegroups.com
#29311: Ease customizing URLField validation
-------------------------------------+-------------------------------------

Reporter: Arthur Pemberton | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: 2.0
(models, ORM) |
Severity: Normal | Resolution: duplicate

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => duplicate
* type: Bug => Cleanup/optimization
* component: Uncategorized => Database layer (models, ORM)


Comment:

Duplicate of #25594.

--
Ticket URL: <https://code.djangoproject.com/ticket/29311#comment:1>

Reply all
Reply to author
Forward
0 new messages