-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use COMPRESS_OFFLINE_CONTEXT in offline templates discovery
Test case for template inheritance with variable from context and super Test case for template inheritance with variable from context
- Loading branch information
1 parent
512ecf2
commit c0010bf
Showing
11 changed files
with
130 additions
and
50 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
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
8 changes: 8 additions & 0 deletions
8
compressor/tests/test_templates/test_with_context_variable_inheritance/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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% load compress %} | ||
{% spaceless %} | ||
{% compress js %} | ||
<script type="text/javascript"> | ||
alert("test using template extension passed in variable parent=base.html"); | ||
</script> | ||
{% endcompress %} | ||
{% endspaceless %} |
1 change: 1 addition & 0 deletions
1
.../tests/test_templates/test_with_context_variable_inheritance/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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends parent_template %} |
7 changes: 7 additions & 0 deletions
7
compressor/tests/test_templates/test_with_context_variable_inheritance_super/base1.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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% spaceless %} | ||
{% block js %} | ||
<script type="text/javascript"> | ||
alert("test using template extension passed in variable parent=base1.html"); | ||
</script> | ||
{% endblock %} | ||
{% endspaceless %} |
7 changes: 7 additions & 0 deletions
7
compressor/tests/test_templates/test_with_context_variable_inheritance_super/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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% spaceless %} | ||
{% block js %} | ||
<script type="text/javascript"> | ||
alert("test using template extension passed in variable parent=base2.html"); | ||
</script> | ||
{% endblock %} | ||
{% endspaceless %} |
8 changes: 8 additions & 0 deletions
8
.../test_templates/test_with_context_variable_inheritance_super/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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% extends parent_template %} | ||
{% load compress %} | ||
|
||
{% block js %}{% spaceless %} | ||
{% compress js %} | ||
{{ block.super }} | ||
{% endcompress %} | ||
{% endspaceless %}{% endblock %} |
8 changes: 8 additions & 0 deletions
8
compressor/tests/test_templates_jinja2/test_with_context_variable_inheritance/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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
{% spaceless %} | ||
{% compress js %} | ||
<script type="text/javascript"> | ||
alert("test using template extension passed in variable parent=base.html"); | ||
</script> | ||
{% endcompress %} | ||
{% endspaceless %} |
1 change: 1 addition & 0 deletions
1
...test_templates_jinja2/test_with_context_variable_inheritance/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 | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{% extends parent_template %} |