From 4ce5a4346224b92f18e8191e2bce3c0559c9c85a Mon Sep 17 00:00:00 2001 From: bdauer Date: Tue, 7 Aug 2018 15:56:51 -0400 Subject: [PATCH 1/2] Removed type from link and script tags --- README.md | 6 +++--- tests/app/tests/test_webpack.py | 10 +++++----- webpack_loader/utils.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 34eefc0d..f7b41d4f 100644 --- a/README.md +++ b/README.md @@ -123,7 +123,7 @@ WEBPACK_LOADER = { If the bundle generates a file called `main-cf4b5fab6e00a404e0c7.js` and your STATIC_URL is `/static/`, then the `', - ''] +['', + ''] ``` ## How to use in Production diff --git a/tests/app/tests/test_webpack.py b/tests/app/tests/test_webpack.py index 6945b820..73f6b510 100644 --- a/tests/app/tests/test_webpack.py +++ b/tests/app/tests/test_webpack.py @@ -109,11 +109,11 @@ def test_templatetags(self): view = TemplateView.as_view(template_name='home.html') request = self.factory.get('/') result = view(request) - self.assertIn('', result.rendered_content) - self.assertIn('', result.rendered_content) + self.assertIn('', result.rendered_content) + self.assertIn('', result.rendered_content) - self.assertIn('', result.rendered_content) - self.assertIn('', result.rendered_content) + self.assertIn('', result.rendered_content) + self.assertIn('', result.rendered_content) self.assertIn('', result.rendered_content) view = TemplateView.as_view(template_name='only_files.html') @@ -159,7 +159,7 @@ def test_jinja2(self): request = self.factory.get('/') result = view(request) self.assertIn('', result.rendered_content) - self.assertIn('', result.rendered_content) + self.assertIn('', result.rendered_content) def test_reporting_errors(self): self.compile_bundles('webpack.config.error.js') diff --git a/webpack_loader/utils.py b/webpack_loader/utils.py index e7b7b2f3..ea39578f 100644 --- a/webpack_loader/utils.py +++ b/webpack_loader/utils.py @@ -47,11 +47,11 @@ def get_as_tags(bundle_name, extension=None, config='DEFAULT', attrs=''): for chunk in bundle: if chunk['name'].endswith(('.js', '.js.gz')): tags.append(( - '' + '' ).format(chunk['url'], attrs)) elif chunk['name'].endswith(('.css', '.css.gz')): tags.append(( - '' + '' ).format(chunk['url'], attrs)) return tags From 057257a69792a8f9975caecc2f3b9e54092f33c8 Mon Sep 17 00:00:00 2001 From: bdauer Date: Tue, 14 Aug 2018 10:44:24 -0400 Subject: [PATCH 2/2] fixup! Removed type from link and script tags --- tests/app/tests/test_webpack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/app/tests/test_webpack.py b/tests/app/tests/test_webpack.py index 73f6b510..b38c59a7 100644 --- a/tests/app/tests/test_webpack.py +++ b/tests/app/tests/test_webpack.py @@ -158,7 +158,7 @@ def test_jinja2(self): with self.settings(**settings): request = self.factory.get('/') result = view(request) - self.assertIn('', result.rendered_content) + self.assertIn('', result.rendered_content) self.assertIn('', result.rendered_content) def test_reporting_errors(self):