diff options
| author | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:03:47 +0000 |
|---|---|---|
| committer | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:03:47 +0000 |
| commit | 1d12aa2cfe5bf8e9fc36baefb1f9e1bedb9d5b93 (patch) | |
| tree | 560b8295f4825214c4093d33beb2c8b55629c817 /tests/regressiontests/forms | |
| parent | c6e662cd6e84203ca0a5328035d72c6c83f9bae9 (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 'tests/regressiontests/forms')
| -rw-r--r-- | tests/regressiontests/forms/media.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/regressiontests/forms/media.py b/tests/regressiontests/forms/media.py index fc1b412bcf..f47875db34 100644 --- a/tests/regressiontests/forms/media.py +++ b/tests/regressiontests/forms/media.py @@ -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 ############################################################### |
