[Django]-Invoke Django template renderer in memory without any files from strings?

8👍

from django.template import Context, Template

template = Template("this is a template string! {{ foo }}")
c = Context({"foo": "barbarbar"})
print template.render(c)

Leave a comment