Kaydet (Commit) 03373f1e authored tarafından Malcolm Tredinnick's avatar Malcolm Tredinnick

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
üst 8099bc53
......@@ -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'':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment