summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorJames Bennett <ubernostrum@gmail.com>2010-03-03 08:03:47 +0000
committerJames Bennett <ubernostrum@gmail.com>2010-03-03 08:03:47 +0000
commit1d12aa2cfe5bf8e9fc36baefb1f9e1bedb9d5b93 (patch)
tree560b8295f4825214c4093d33beb2c8b55629c817 /django/forms
parentc6e662cd6e84203ca0a5328035d72c6c83f9bae9 (diff)
[1.1.X] Fixed #12879: Declaring the same JS file multiple times in a single Media instance now only includes that file once. Backport of [12663] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12664 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/widgets.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py
index 36018979b8..ffab039829 100644
--- a/django/forms/widgets.py
+++ b/django/forms/widgets.py
@@ -80,7 +80,9 @@ class Media(StrAndUnicode):
def add_js(self, data):
if data:
- self._js.extend([path for path in data if path not in self._js])
+ for path in data:
+ if path not in self._js:
+ self._js.append(path)
def add_css(self, data):
if data: