diff options
| author | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:01:48 +0000 |
|---|---|---|
| committer | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:01:48 +0000 |
| commit | 9a82ca0a36798d0ca33353cd933cdbc8da0f677b (patch) | |
| tree | bc4f43e114e8526285d72ade09361c9a24b525a7 /django/forms | |
| parent | 600aa6679ed98d132fc378dfa205f482a58cceb1 (diff) | |
Fixed #12879: Declaring the same JS file multiple times in a single Media instance now only includes that file once.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms')
| -rw-r--r-- | django/forms/widgets.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/forms/widgets.py b/django/forms/widgets.py index ee1966b76f..482c718118 100644 --- a/django/forms/widgets.py +++ b/django/forms/widgets.py @@ -75,7 +75,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: |
