Created
September 11, 2015 15:21
-
-
Save ten0s/40ecec1aace02cbc4051 to your computer and use it in GitHub Desktop.
How to debug jinja2 templates
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
In [1]: from jinja2 import Template | |
In [2]: Template("{{s.split('-')}}").render(s='a-bad-string') | |
Out[2]: u"['a', 'bad', 'string']" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Template("releases/{{ver.split('-')[0]}}/sys.config").render(ver='v2.1-28-g6379b92')
u'releases/v2.1/sys.config'