mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 03:07:19 +00:00
Django 3.1 no longer outputs type="text/javascript".
This commit is contained in:
parent
d874efd72e
commit
ec7b10f4db
3 changed files with 8 additions and 8 deletions
|
@ -140,7 +140,7 @@ The output from the above template will be:
|
|||
<head>
|
||||
<title>My example calendar</title>
|
||||
<link href="style.css" type="text/css" media="all" rel="stylesheet">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="calendar-component">Today's date is <span>2015-06-19</span></div>
|
||||
|
|
|
@ -33,7 +33,7 @@ class ComponentRegistryTest(SimpleTestCase):
|
|||
|
||||
self.assertHTMLEqual(comp.render_dependencies(), dedent("""
|
||||
<link href="style.css" type="text/css" media="all" rel="stylesheet">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script src="script.js"></script>
|
||||
""").strip())
|
||||
|
||||
self.assertHTMLEqual(comp.render(variable="test"), dedent("""
|
||||
|
@ -51,8 +51,8 @@ class ComponentRegistryTest(SimpleTestCase):
|
|||
self.assertHTMLEqual(comp.render_dependencies(), dedent("""
|
||||
<link href="style.css" type="text/css" media="all" rel="stylesheet">
|
||||
<link href="style2.css" type="text/css" media="all" rel="stylesheet">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
<script type="text/javascript" src="script2.js"></script>
|
||||
<script src="script.js"></script>
|
||||
<script src="script2.js"></script>
|
||||
""").strip())
|
||||
|
||||
def test_component_with_filtered_template(self):
|
||||
|
|
|
@ -58,7 +58,7 @@ class ComponentTemplateTagTest(SimpleTestCase):
|
|||
rendered = template.render(Context())
|
||||
expected_outcome = (
|
||||
"""<link href="style.css" type="text/css" media="all" rel="stylesheet">\n"""
|
||||
"""<script type="text/javascript" src="script.js"></script>"""
|
||||
"""<script src="script.js"></script>"""
|
||||
)
|
||||
self.assertHTMLEqual(rendered, dedent(expected_outcome))
|
||||
|
||||
|
@ -78,7 +78,7 @@ class ComponentTemplateTagTest(SimpleTestCase):
|
|||
template = Template("{% load component_tags %}{% component_js_dependencies %}")
|
||||
rendered = template.render(Context())
|
||||
expected_outcome = (
|
||||
"""<script type="text/javascript" src="script.js"></script>"""
|
||||
"""<script src="script.js"></script>"""
|
||||
)
|
||||
self.assertHTMLEqual(rendered, dedent(expected_outcome))
|
||||
|
||||
|
@ -122,7 +122,7 @@ class ComponentTemplateTagTest(SimpleTestCase):
|
|||
rendered = template.render(Context())
|
||||
expected_outcome = (
|
||||
"""<link href="style.css" type="text/css" media="all" rel="stylesheet">\n"""
|
||||
"""<script type="text/javascript" src="script.js"></script>"""
|
||||
"""<script src="script.js"></script>"""
|
||||
)
|
||||
self.assertHTMLEqual(rendered, dedent(expected_outcome))
|
||||
|
||||
|
@ -144,7 +144,7 @@ class ComponentTemplateTagTest(SimpleTestCase):
|
|||
template = Template("{% load component_tags %}{% component_js_dependencies %}")
|
||||
rendered = template.render(Context())
|
||||
expected_outcome = (
|
||||
"""<script type="text/javascript" src="script.js"></script>"""
|
||||
"""<script src="script.js"></script>"""
|
||||
)
|
||||
self.assertHTMLEqual(rendered, dedent(expected_outcome))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue