--
Ticket URL: <https://code.djangoproject.com/ticket/18119>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_docs: => 1
* needs_better_patch: => 1
* needs_tests: => 1
* stage: Unreviewed => Accepted
Comment:
I think it is a good idea to centralize domain name validation. I detected
at least three points where we could use this validator
(django/core/mail/message.py, django/core/validators.py (URLValidator),
django/utils/html.py).
For DRY reasons, the domain regex part should be shared with URLValidator.
In `__init__`, just use {{{self.accept_idna = kwargs.pop('accept_idna',
True)}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:1>
Comment (by michele):
In attachment:domainnamevalidator_2.txt :
* fix the constructor argument as per claudep suggestion
* return a specific error message based on IDNA being accepted or not
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:2>
* needs_better_patch: 1 => 0
* version: 1.4 => master
* needs_tests: 1 => 0
* needs_docs: 1 => 0
Comment:
https://github.com/django/django/pull/3477
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:3>
* needs_better_patch: 0 => 1
Comment:
This is blocked on #20003. Patch will need to be updated after that
change.
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:4>
Comment (by guettli):
would be nice to have
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:5>
* needs_better_patch: 1 => 0
Comment:
Updated [https://github.com/django/django/pull/7300 PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:6>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:7>
* owner: nobody => Nina Menezes
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/18119#comment:8>