Commit 03373f1e authored by Malcolm Tredinnick's avatar Malcolm Tredinnick
Browse files

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
parent 8099bc53
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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'':