1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

Fixed #3281 -- newforms: URLField now works properly with required=False and verify_exists=True together. Thanks, zendak

git-svn-id: http://code.djangoproject.com/svn/django/trunk@4313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2007-01-13 05:19:15 +00:00
parent 6b31f95516
commit f2a3deb087
2 changed files with 7 additions and 0 deletions

View File

@@ -288,6 +288,8 @@ class URLField(RegexField):
def clean(self, value):
value = RegexField.clean(self, value)
if not self.required and value == u'':
return value
if self.verify_exists:
import urllib2
from django.conf import settings