On Wed, Jan 19, 2011 at 6:29 AM, galago <prog...@gmail.com> wrote:
> When I try to insert that string to urlfield: http://asd[d I get strange
> exception:
>
> Invalid IPv6 URL
>
> How to correct it to show message and not error 500?

You will likely need to post some more information: What version of
Django, and what version of Python are you using?

A very quick search suggests that this is a new exception emitted by
Python 2.7; Django's URLField tries to validate the url with an actual
network connection, using Python's urllib2.

The URL you are trying to insert may be just valid enough to get past
the regex checks, and is then parsed by Python as an IPv6 address, and
rejected.

I don't have python 2.7 installed anywhere to check this, but if true,
this may be a bug in Django: Either the regex checks should be
tightened, or the new exception should be caught in the URL Validator.

Without some more info, this is all speculation anyway, though.

Regards,
Ian Clelland
<clell...@gmail.com>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to