#27125: Can not support django Internationalized domain name in URLValidation
-----------------------------+--------------------------------------
Reporter: RaminFP | Owner: nobody
Type: New feature | Status: closed
Component: Core (URLs) | Version: 1.10
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Comment (by RaminFP):
Replying to [comment:3 claudep]:
> I cannot reproduce the issue on my system, but I guess the problem may
come from the fact you are passing a bytestring instead of an Unicode
string to validate. Try prefixing your URL with the `u` prefix (needed on
Python 2 only).
> Validating non-ASCII URLs is tested in Django, see
https://github.com/django/django/blob/master/tests/validators/valid_urls.txt
{{{
>>> validate = URLValidator()
>>> validate(u'http://عربی.امارات')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\django\core\validators.py", line
132, in __call__
super(URLValidator, self).__call__(url)
File "C:\Python27\lib\site-packages\django\core\validators.py", line 61,
in __call__
raise ValidationError(self.message, code=self.code)
django.core.exceptions.ValidationError
>>>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27125#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 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.85e96cc2ba55e4265825ca95183789c7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.