Hi there!
I'm using the app Outbound email 2. My question is:
In normal python you can pass a context to a jinja2 template. can something similar be done here?
Say, for example I want my template to reference a variable that was previously set on my script. Take this example:
inputs.mail_to = "mail@mail.com"
inputs.mail_incident_id = incident.id
inputs.mail_subject = "TEST JINJA"
inputs.mail_message_id = f"someid@resilient.ypf.com"
foo = 3
inputs.mail_inline_template ='''
{{ foo }}
'''
I need to reference 'foo' inside the template. But this snippet of code gives error 'unknown foo in template line 2'.
Any idea how can this be done?
------------------------------
Diego Mastrolorenzo
------------------------------