From 03373f1e24e3bdfef149de5e0478a39f38f1434d Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sat, 26 Jul 2008 17:08:53 +0000 Subject: [PATCH] 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 --- django/forms/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'':