forked from django-compressor/django-compressor
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request django-compressor#198 from diox/develop
Make {{ block.super }} in compress management command a little more robust
- Loading branch information
Showing
8 changed files
with
153 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
compressor/tests/test_templates/test_block_super_extra/base.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
{% spaceless %} | |||
{% block js %} | |||
<script type="text/javascript"> | |||
alert("test using block.super"); | |||
</script> | |||
{% endblock %} | |||
|
|||
{% block css %} | |||
<style type="text/css"> | |||
body { | |||
background: red; | |||
} | |||
</style> | |||
{% endblock %} | |||
{% endspaceless %} |
19 changes: 19 additions & 0 deletions
19
compressor/tests/test_templates/test_block_super_extra/test_compressor_offline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
{% extends "base.html" %} | |||
{% load compress %} | |||
|
|||
{% block js %}{% spaceless %} | |||
{% compress js %} | |||
<script type="text/javascript"> | |||
alert("this alert should be alone."); | |||
</script> | |||
{% endcompress %} | |||
|
|||
{% compress js %} | |||
{{ block.super }} | |||
<script type="text/javascript"> | |||
alert("this alert shouldn't be alone!"); | |||
</script> | |||
{% endcompress %} | |||
{% endspaceless %}{% endblock %} | |||
|
|||
{% block css %}{% endblock %} |
15 changes: 15 additions & 0 deletions
15
compressor/tests/test_templates/test_block_super_multiple/base.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,15 @@ | |||
{% spaceless %} | |||
{% block js %} | |||
<script type="text/javascript"> | |||
alert("test using multiple inheritance and block.super"); | |||
</script> | |||
{% endblock %} | |||
|
|||
{% block css %} | |||
<style type="text/css"> | |||
body { | |||
background: red; | |||
} | |||
</style> | |||
{% endblock %} | |||
{% endspaceless %} |
3 changes: 3 additions & 0 deletions
3
compressor/tests/test_templates/test_block_super_multiple/base2.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,3 @@ | |||
{% extends "base.html" %} | |||
|
|||
{% block css %}{% endblock %} |
11 changes: 11 additions & 0 deletions
11
compressor/tests/test_templates/test_block_super_multiple/test_compressor_offline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,11 @@ | |||
{% extends "base2.html" %} | |||
{% load compress %} | |||
|
|||
{% block js %}{% spaceless %} | |||
{% compress js %} | |||
{{ block.super }} | |||
<script type="text/javascript"> | |||
alert("this alert shouldn't be alone!"); | |||
</script> | |||
{% endcompress %} | |||
{% endspaceless %}{% endblock %} |