4 | This is a test! Mail me at 5 | 6 | 7 | mail@example.tld 8 | 9 |
10 | 11 |12 | 13 | Yep! 14 | 15 |
16 | 17 |Hey {{ foo }}!
{% endmacro %} 2 | {% macro imported_macro_void() export %}Hello mate!
{% endmacro %} -------------------------------------------------------------------------------- /pongo2/template_tests/macro2.helper: -------------------------------------------------------------------------------- 1 | {% macro greeter_macro() export %} 2 | {% import "macro.helper" imported_macro, imported_macro_void %} 3 | One greeting: {{ imported_macro("Dirk") }} - {{ imported_macro_void() }} 4 | {% endmacro %} -------------------------------------------------------------------------------- /pongo2/template_tests/now.tpl: -------------------------------------------------------------------------------- 1 | {# The 'fake' argument exists to have tests for the now-tag; it will set the time to a specific date instead of now #} 2 | {% now "Mon Jan 2 15:04:05 -0700 MST 2006" fake %} -------------------------------------------------------------------------------- /pongo2/template_tests/now.tpl.out: -------------------------------------------------------------------------------- 1 | 2 | Wed Feb 5 18:31:45 +0000 UTC 2014 -------------------------------------------------------------------------------- /pongo2/template_tests/pongo2ctx.tpl: -------------------------------------------------------------------------------- 1 | {{ pongo2.version }} -------------------------------------------------------------------------------- /pongo2/template_tests/pongo2ctx.tpl.out: -------------------------------------------------------------------------------- 1 | dev -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox-compilation.err: -------------------------------------------------------------------------------- 1 | {{ "hello"|banned_filter }} 2 | {% banned_tag %} 3 | {% include "../../test_not_existent" %} -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox-compilation.err.out: -------------------------------------------------------------------------------- 1 | .*Usage of filter 'banned_filter' is not allowed \(sandbox restriction active\). 2 | .*Usage of tag 'banned_tag' is not allowed \(sandbox restriction active\). 3 | \[Error \(where: fromfile\) | Line 1 Col 12 near '../../test_not_existent'\] open : no such file or directory -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox.tpl: -------------------------------------------------------------------------------- 1 | {{ "hello"|unbanned_filter }} 2 | {% unbanned_tag %} 3 | {% include temp_file %} -------------------------------------------------------------------------------- /pongo2/template_tests/sandbox.tpl.out: -------------------------------------------------------------------------------- 1 | hello 2 | hello 3 | Hello from pongo2 -------------------------------------------------------------------------------- /pongo2/template_tests/set.tpl: -------------------------------------------------------------------------------- 1 | {% set new_var = "hello" %}{{ new_var }} 2 | {% block content %}{% set new_var = "world" %}{{ new_var }}{% endblock %} 3 | {{ new_var }}{% for item in simple.misc_list %} 4 | {% set new_var = item %}{{ new_var }}{% endfor %} 5 | {{ new_var }} 6 | {% set car=someUndefinedVar %}{{ car.Drive }}No Panic -------------------------------------------------------------------------------- /pongo2/template_tests/set.tpl.out: -------------------------------------------------------------------------------- 1 | hello 2 | world 3 | world 4 | Hello 5 | 99 6 | 3.140000 7 | good 8 | world 9 | No Panic -------------------------------------------------------------------------------- /pongo2/template_tests/spaceless.tpl: -------------------------------------------------------------------------------- 1 | {% spaceless %} 2 |4 | This is a test! Mail me at 5 | 6 | 7 | mail@example.tld 8 | 9 |
10 | 11 |12 | 13 | Yep! 14 | 15 |
16 | 17 |3 | This is a test! Mail me at 4 | 5 | 6 | mail@example.tld 7 |
8 | 9 | Yep! 10 | 11 |