From e703b93a656b78b9b444bb3a9980e305ed002a70 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Wed, 11 Dec 2019 00:49:54 -0800 Subject: Fixed #31080 -- Removed redundant type="text/javascript" attribute from + {% endblock %} {% block extrastyle %}{{ block.super }}{% endblock %} {% block bodyclass %}{{ block.super }} {{ opts.app_label }}-{{ opts.model_name }} change-form{% endblock %} diff --git a/django/contrib/admin/templates/admin/change_form.html b/django/contrib/admin/templates/admin/change_form.html index 1d749f25d3..f99936d21f 100644 --- a/django/contrib/admin/templates/admin/change_form.html +++ b/django/contrib/admin/templates/admin/change_form.html @@ -2,7 +2,7 @@ {% load i18n admin_urls static admin_modify %} {% block extrahead %}{{ block.super }} - + {{ media }} {% endblock %} @@ -64,8 +64,7 @@ {% block submit_buttons_bottom %}{% submit_row %}{% endblock %} {% block admin_change_form_document_ready %} - + {% endif %} {{ media.css }} {% if not actions_on_top and not actions_on_bottom %} diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html index d9e41717a0..4a1c065cb2 100644 --- a/django/contrib/admin/templates/admin/delete_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_confirmation.html @@ -4,7 +4,7 @@ {% block extrahead %} {{ block.super }} {{ media }} - + {% endblock %} {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation{% endblock %} diff --git a/django/contrib/admin/templates/admin/delete_selected_confirmation.html b/django/contrib/admin/templates/admin/delete_selected_confirmation.html index ce5b163869..bab4cd31c2 100644 --- a/django/contrib/admin/templates/admin/delete_selected_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_selected_confirmation.html @@ -4,7 +4,7 @@ {% block extrahead %} {{ block.super }} {{ media }} - + {% endblock %} {% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} delete-confirmation delete-selected-confirmation{% endblock %} diff --git a/django/contrib/admin/templates/admin/popup_response.html b/django/contrib/admin/templates/admin/popup_response.html index 303960ff5d..509a81a7c2 100644 --- a/django/contrib/admin/templates/admin/popup_response.html +++ b/django/contrib/admin/templates/admin/popup_response.html @@ -2,8 +2,7 @@ {% trans 'Popup closing…' %} - diff --git a/django/contrib/admin/templates/admin/prepopulated_fields_js.html b/django/contrib/admin/templates/admin/prepopulated_fields_js.html index 157233993f..bbe1916fe3 100644 --- a/django/contrib/admin/templates/admin/prepopulated_fields_js.html +++ b/django/contrib/admin/templates/admin/prepopulated_fields_js.html @@ -1,6 +1,5 @@ {% load l10n static %} - diff --git a/django/contrib/gis/templates/gis/admin/openlayers.html b/django/contrib/gis/templates/gis/admin/openlayers.html index 56bb50b0bf..cc9bea3efd 100644 --- a/django/contrib/gis/templates/gis/admin/openlayers.html +++ b/django/contrib/gis/templates/gis/admin/openlayers.html @@ -25,7 +25,7 @@ {% endblock %} - + diff --git a/django/contrib/gis/templates/gis/openlayers.html b/django/contrib/gis/templates/gis/openlayers.html index 5455a7d633..88288a3cb7 100644 --- a/django/contrib/gis/templates/gis/openlayers.html +++ b/django/contrib/gis/templates/gis/openlayers.html @@ -12,7 +12,7 @@ {% if not disabled %}{% trans "Delete all Features" %}{% endif %} {% if display_raw %}

{% trans "Debugging window (serialized value)" %}

{% endif %} - ', + '', self.absolute_path(path) ) for path in self._js ] diff --git a/django/views/templates/technical_500.html b/django/views/templates/technical_500.html index 6a8ea005b2..b01b00c8e6 100644 --- a/django/views/templates/technical_500.html +++ b/django/views/templates/technical_500.html @@ -63,7 +63,7 @@ .append-bottom { margin-bottom: 10px; } {% if not is_email %} - - + + {% endblock %} .. code-block:: javascript @@ -66,7 +66,7 @@ listen to the event triggered from there. For example: {% block admin_change_form_document_ready %} {{ block.super }} - + {% endblock %} .. code-block:: javascript diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index ee6d0643fe..94bf447aab 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -136,7 +136,7 @@ and read the token from the DOM with JavaScript: .. code-block:: html+django {% csrf_token %} - diff --git a/docs/topics/forms/media.txt b/docs/topics/forms/media.txt index c88679dda6..d12b66fe6e 100644 --- a/docs/topics/forms/media.txt +++ b/docs/topics/forms/media.txt @@ -72,8 +72,8 @@ can be retrieved through this property:: >>> w = CalendarWidget() >>> print(w.media) - - + + Here's a list of all possible ``Media`` options. There are no required options. @@ -147,9 +147,9 @@ example above:: >>> print(w.media) - - - + + + The FancyCalendar widget inherits all the assets from its parent widget. If you don't want ``Media`` to be inherited in this way, add @@ -166,7 +166,7 @@ an ``extend=False`` declaration to the ``Media`` declaration:: >>> w = FancyCalendarWidget() >>> print(w.media) - + If you require even more control over inheritance, define your assets using a :ref:`dynamic property `. Dynamic properties give you @@ -229,16 +229,16 @@ was ``None``:: >>> w = CalendarWidget() >>> print(w.media) - - + + But if :setting:`STATIC_URL` is ``'http://static.example.com/'``:: >>> w = CalendarWidget() >>> print(w.media) - - + + Or if :mod:`~django.contrib.staticfiles` is configured using the :class:`~django.contrib.staticfiles.storage.ManifestStaticFilesStorage`:: @@ -246,8 +246,8 @@ Or if :mod:`~django.contrib.staticfiles` is configured using the >>> w = CalendarWidget() >>> print(w.media) - - + + ``Media`` objects ================= @@ -269,8 +269,8 @@ operator to filter out a medium of interest. For example:: >>> w = CalendarWidget() >>> print(w.media) - - + + >>> print(w.media['css']) @@ -301,9 +301,9 @@ specified by both:: >>> w2 = OtherWidget() >>> print(w1.media + w2.media) - - - + + + .. _form-media-asset-order: @@ -327,10 +327,10 @@ For example:: >>> w1 = CalendarWidget() >>> w2 = TimeWidget() >>> print(w1.media + w2.media) - - - - + + + + Combining ``Media`` objects with assets in a conflicting order results in a ``MediaOrderConflictWarning``. @@ -357,9 +357,9 @@ are part of the form:: >>> f = ContactForm() >>> f.media - - - + + + If you want to associate additional assets with a form -- for example, CSS for form layout -- add a ``Media`` declaration to the form:: @@ -377,6 +377,6 @@ CSS for form layout -- add a ``Media`` declaration to the form:: >>> f.media - - - + + + diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index f9bb27b6b7..7a8be1eb4a 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1052,7 +1052,7 @@ To use the catalog, pull in the dynamically generated script like this: .. code-block:: html+django - + This uses reverse URL lookup to find the URL of the JavaScript catalog view. When the catalog is loaded, your JavaScript code can use the following methods: diff --git a/tests/admin_views/templates/admin/admin_views/article/prepopulated_fields_js.html b/tests/admin_views/templates/admin/admin_views/article/prepopulated_fields_js.html index 0ee8c7a06c..4103338b3b 100644 --- a/tests/admin_views/templates/admin/admin_views/article/prepopulated_fields_js.html +++ b/tests/admin_views/templates/admin/admin_views/article/prepopulated_fields_js.html @@ -1,6 +1,5 @@ {% load l10n static %} - - -""" + + +""" ) self.assertEqual( repr(m), @@ -40,9 +40,9 @@ class FormsMediaTestCase(SimpleTestCase): str(m3), """ - - -""" + + +""" ) # A widget can exist without a media definition @@ -72,9 +72,9 @@ class FormsMediaTestCase(SimpleTestCase): str(w1.media), """ - - -""" + + +""" ) # Media objects can be interrogated by media type @@ -86,9 +86,9 @@ class FormsMediaTestCase(SimpleTestCase): self.assertEqual( str(w1.media['js']), - """ - -""" + """ + +""" ) def test_combine_media(self): @@ -123,10 +123,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) # media addition hasn't affected the original objects @@ -134,9 +134,9 @@ class FormsMediaTestCase(SimpleTestCase): str(w1.media), """ - - -""" + + +""" ) # Regression check for #12879: specifying the same CSS or JS file @@ -149,7 +149,7 @@ class FormsMediaTestCase(SimpleTestCase): w4 = MyWidget4() self.assertEqual(str(w4.media), """ -""") +""") def test_media_deduplication(self): # A deduplication test applied directly to a Media object, to confirm @@ -160,7 +160,7 @@ class FormsMediaTestCase(SimpleTestCase): js=('/path/to/js1', '/path/to/js1'), ) self.assertEqual(str(media), """ -""") +""") def test_media_property(self): ############################################################### @@ -175,7 +175,7 @@ class FormsMediaTestCase(SimpleTestCase): w4 = MyWidget4() self.assertEqual(str(w4.media), """ -""") +""") # Media properties can reference the media of their parents class MyWidget5(MyWidget4): @@ -186,8 +186,8 @@ class FormsMediaTestCase(SimpleTestCase): w5 = MyWidget5() self.assertEqual(str(w5.media), """ - -""") + +""") def test_media_property_parent_references(self): # Media properties can reference the media of their parents, @@ -210,10 +210,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) def test_media_inheritance(self): @@ -237,9 +237,9 @@ class FormsMediaTestCase(SimpleTestCase): str(w7.media), """ - - -""" + + +""" ) # If a widget extends another but defines media, it extends the parent widget's media by default @@ -256,10 +256,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) def test_media_inheritance_from_property(self): @@ -289,8 +289,8 @@ class FormsMediaTestCase(SimpleTestCase): str(w9.media), """ - -""" + +""" ) # A widget can disable media inheritance by specifying 'extend=False' @@ -305,8 +305,8 @@ class FormsMediaTestCase(SimpleTestCase): w10 = MyWidget10() self.assertEqual(str(w10.media), """ - -""") + +""") def test_media_inheritance_extends(self): # A widget can explicitly enable full media inheritance by specifying 'extend=True' @@ -331,10 +331,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) def test_media_inheritance_single_type(self): @@ -360,8 +360,8 @@ class FormsMediaTestCase(SimpleTestCase): """ - -""" + +""" ) def test_multi_media(self): @@ -386,8 +386,8 @@ class FormsMediaTestCase(SimpleTestCase): - -""" + +""" ) def test_multi_widget(self): @@ -429,10 +429,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) def test_form_media(self): @@ -471,10 +471,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) # Form media can be combined to produce a single media definition. @@ -486,10 +486,10 @@ class FormsMediaTestCase(SimpleTestCase): """ - - - -""" + + + +""" ) # Forms can also define media, following the same rules as widgets. @@ -509,21 +509,21 @@ class FormsMediaTestCase(SimpleTestCase): - - - - -""" + + + + +""" ) # Media works in templates self.assertEqual( Template("{{ form.media.js }}{{ form.media.css }}").render(Context({'form': f3})), - """ - - - -""" + """ + + + +""" """ diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py index e264b6df77..8259b3b8bd 100644 --- a/tests/model_forms/tests.py +++ b/tests/model_forms/tests.py @@ -2386,7 +2386,7 @@ class OtherModelFormTests(TestCase): self.assertHTMLEqual( str(f.media), ''' -''' +''' ) def test_choices_type(self): diff --git a/tests/staticfiles_tests/test_forms.py b/tests/staticfiles_tests/test_forms.py index 0178bab931..1fbcbe164c 100644 --- a/tests/staticfiles_tests/test_forms.py +++ b/tests/staticfiles_tests/test_forms.py @@ -31,8 +31,8 @@ class StaticFilesFormsMediaTestCase(SimpleTestCase): str(m), """ - - - -""" + + + +""" ) diff --git a/tests/templates/custom_admin/change_list.html b/tests/templates/custom_admin/change_list.html index eebc9c7e30..bb6f43748e 100644 --- a/tests/templates/custom_admin/change_list.html +++ b/tests/templates/custom_admin/change_list.html @@ -1,7 +1,7 @@ {% extends "admin/change_list.html" %} {% block extrahead %} - {% endblock %} diff --git a/tests/utils_tests/files/strip_tags1.html b/tests/utils_tests/files/strip_tags1.html index 5e191f31fd..1e09134e81 100644 --- a/tests/utils_tests/files/strip_tags1.html +++ b/tests/utils_tests/files/strip_tags1.html @@ -24,8 +24,8 @@ - - + + diff --git a/tests/view_tests/templates/jsi18n-multi-catalogs.html b/tests/view_tests/templates/jsi18n-multi-catalogs.html index 8ec902e1c7..11b84d0bfa 100644 --- a/tests/view_tests/templates/jsi18n-multi-catalogs.html +++ b/tests/view_tests/templates/jsi18n-multi-catalogs.html @@ -1,15 +1,15 @@ - - + +

-

-

diff --git a/tests/view_tests/templates/jsi18n.html b/tests/view_tests/templates/jsi18n.html index f0bd17c199..40ae8e7221 100644 --- a/tests/view_tests/templates/jsi18n.html +++ b/tests/view_tests/templates/jsi18n.html @@ -1,11 +1,11 @@ - +

-

-

-

-

-

-

-

-- cgit v1.2.1