mirror of
https://github.com/django/django.git
synced 2025-11-23 12:26:57 +00:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue