Closed mgax closed 2 months ago
TODO:
NewsletterPageMixin
as opposed to a Django email template outside of Wagtail.@thibaudcolas I've changed the spike implementation to do the MJML rendering inside the template with an {% mrml %}
tag that is a drop-in replacement for django-mjml's {% mjml %}
tag: https://github.com/mgax/newsletter-spike-mailchimp/commit/69e3a0c0ebc791f39de2a59219832a214c58b339.
I've played around with the template rendering for the newsletter and have this experiment working: https://github.com/mgax/newsletter-spike-mailchimp/blob/55a0996acca30938a77aef7c489c66d6b53f6a98/spike/content/models.py#L95-L102.
NewsletterPageMixin
and define anewsletter_template
.mrml.to_html
to render the template. If the integrator wants to replace the MJML implementation, they can override render_newsletter, which is quite small.