summaryrefslogtreecommitdiff
path: root/django/forms/fields.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-26 17:08:53 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-07-26 17:08:53 +0000
commit03373f1e24e3bdfef149de5e0478a39f38f1434d (patch)
tree8d755c7982ccbbb036d24144044440078a133ab4 /django/forms/fields.py
parent8099bc536bbd5d216f0ca781d9ff1c303917430b (diff)
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
Diffstat (limited to 'django/forms/fields.py')
-rw-r--r--django/forms/fields.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/forms/fields.py b/django/forms/fields.py
index 6b834af0c4..f2c3b97475 100644
--- a/django/forms/fields.py
+++ b/django/forms/fields.py
@@ -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'':