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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user