mirror of https://github.com/django/django.git
Fixed #2997 -- Fixed URLField validation in django.newforms. Thanks, jkocherhans
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4061 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
7cce717f34
commit
6a53c8a2dd
|
@ -215,7 +215,7 @@ class URLField(RegexField):
|
||||||
"User-Agent": self.user_agent,
|
"User-Agent": self.user_agent,
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
req = urllib2.Request(field_data, None, headers)
|
req = urllib2.Request(value, None, headers)
|
||||||
u = urllib2.urlopen(req)
|
u = urllib2.urlopen(req)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise ValidationError(u'Enter a valid URL.')
|
raise ValidationError(u'Enter a valid URL.')
|
||||||
|
|
Loading…
Reference in New Issue