1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

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
This commit is contained in:
James Bennett
2010-03-03 08:01:48 +00:00
parent 600aa6679e
commit 9a82ca0a36
2 changed files with 15 additions and 1 deletions

View File

@@ -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: