aboutsummaryrefslogtreecommitdiffstats
path: root/testing/templates
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-18 16:04:27 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-18 16:04:27 +0100
commit8b5d59af62fe650d7c0e79f2086002fae4942629 (patch)
treeee2227e19426a7c8f63f4463300ff3480143fc7f /testing/templates
parentdbc0c8998b904855ba61ed0c47afc9b5d8ab6afa (diff)
downloadaskama-8b5d59af62fe650d7c0e79f2086002fae4942629.tar.gz
askama-8b5d59af62fe650d7c0e79f2086002fae4942629.tar.bz2
askama-8b5d59af62fe650d7c0e79f2086002fae4942629.zip
Add test for handling Option types (with method calls)
Diffstat (limited to '')
-rw-r--r--testing/templates/option.html5
1 files changed, 5 insertions, 0 deletions
diff --git a/testing/templates/option.html b/testing/templates/option.html
new file mode 100644
index 0000000..64a055e
--- /dev/null
+++ b/testing/templates/option.html
@@ -0,0 +1,5 @@
+{% if var.is_some() -%}
+ some: {{ var.unwrap() }}
+{%- else -%}
+ none
+{%- endif %}