Jinja2 variables are Python objects, so you'll need to pass in an object or dictionary. Try:
template.render(mysql={'user': 'dev'}) -- Kiran Jonnalagadda https://hasgeek.com https://internetfreedom.in On 6 November 2017 at 16:54, 凭栏 <freelingch...@gmail.com> wrote: > how to like this > > ``` > > from jinja2 import Template > template = Template('Hello {{ mysql.user }}!') > template.render(**{"mysql.use":"dev"}) > ``` > thanks > > -- > You received this message because you are subscribed to the Google Groups > "pocoo-libs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pocoo-libs+unsubscr...@googlegroups.com. > To post to this group, send email to pocoo-libs@googlegroups.com. > Visit this group at https://groups.google.com/group/pocoo-libs. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pocoo-libs" group. To unsubscribe from this group and stop receiving emails from it, send an email to pocoo-libs+unsubscr...@googlegroups.com. To post to this group, send email to pocoo-libs@googlegroups.com. Visit this group at https://groups.google.com/group/pocoo-libs. For more options, visit https://groups.google.com/d/optout.