mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +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:
@@ -112,6 +112,18 @@ media_tests = r"""
|
||||
<script type="text/javascript" src="http://media.other.com/path/to/js2"></script>
|
||||
<script type="text/javascript" src="https://secure.other.com/path/to/js3"></script>
|
||||
|
||||
# Regression check for #12879: specifying the same JS file multiple
|
||||
# times in a single Media instance should result in that file only
|
||||
# being included once.
|
||||
>>> class MyWidget4(TextInput):
|
||||
... class Media:
|
||||
... js = ('/path/to/js1', '/path/to/js1')
|
||||
|
||||
>>> w4 = MyWidget4()
|
||||
>>> print w4.media
|
||||
<script type="text/javascript" src="/path/to/js1"></script>
|
||||
|
||||
|
||||
###############################################################
|
||||
# Property-based media definitions
|
||||
###############################################################
|
||||
|
||||
Reference in New Issue
Block a user