cdh.core.mail.widgets module

class cdh.core.mail.widgets.EmailContentEditWidget(preview_url, *args, sender_field: Optional[str] = None, banner_field: Optional[str] = None, footer_field: Optional[str] = None, **kwargs)[source]

Bases: TinyMCEWidget

A custom widget to handle editing custom email templates using TinyMCE.

At the moment this should only be used on the ‘contents’ template.

Will add a ‘preview email’ button to the editor.

__init__(preview_url, *args, sender_field: Optional[str] = None, banner_field: Optional[str] = None, footer_field: Optional[str] = None, **kwargs)[source]
Parameters
  • preview_url – a resolved URL for the EmailPreviewView to use

  • sender_field – (optional) the formfield describing the ‘sender’ template

  • banner_field – (optional) the formfield describing the ‘banner’ template

  • footer_field – (optional) the formfield describing the ‘footer’ template

get_context(*args, **kwargs)[source]
property media