python-emails icon indicating copy to clipboard operation
python-emails copied to clipboard

Support lazy django templates rendering (DjangoMessage)

Open lavr opened this issue 9 years ago • 0 comments

Now we have to make explicit django template rendering:

    from django.template.loader import get_template
    DjangoMessage(html=get_template(template_name).render({'a': 42}, ...)

Proposed way is to support lazy rendering:

    m = DjangoMessage(html=get_template(template_name)
    m.render({'a': 42}, ...)

lavr avatar May 26 '15 12:05 lavr