0
0
mirror of https://github.com/django/django.git synced 2024-11-30 15:10:46 +01:00

Fixed #7345 -- In [8089], I'd forgotten that urlparse.urlsplit() didn't return

something with attributes until Python 2.5. Thanks, Honza Kral and apollo13.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8093 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-07-26 17:08:53 +00:00
parent 8099bc536b
commit 03373f1e24

View File

@ -541,7 +541,7 @@ class URLField(RegexField):
if value and '://' not in value:
value = u'http://%s' % value
# If no URL path given, assume /
if value and not urlparse.urlsplit(value).path:
if value and not urlparse.urlsplit(value)[2]:
value += '/'
value = super(URLField, self).clean(value)
if value == u'':