i want to escape the following complete string using jinja2
{% set src_pk = metadata_dict['src_pk'] -%}
the following works, iam using double quotes
{{"{% set source_model = metadata_dict['source_model'] -%}"}}
however i want to change the ['source_model']
dynamically so i tried the following and none of them seems to work
{{"{% set source_model = metadata_dict['{{POLICY_HK}}'] -%}"}}
, which does not work and print it out as is.{{"{% set source_model = metadata_dict['"+ {{ POLICY_HK }} +"'] -%}"}}
jinja2.exceptions.TemplateSyntaxError: expected token ':', got '}'{{"{% set source_model = metadata_dict["+''{{ POLICY_HK }}+''"] -%}"}}
expected token 'end of print statement', got '{'
any pointers please?
Thanks -Nen