8👍
✅
from django.template import Context, Template
template = Template("this is a template string! {{ foo }}")
c = Context({"foo": "barbarbar"})
print template.render(c)
Source:stackexchange.com