yell.backends.celery

yell.backends.django

class yell.backends.django.EmailBackend[source]

Send emails via django.core.mail.send_mail

body = None

Email body

get_body(*args, **kwargs)[source]

Return a body. Override if you need templating or such.

get_subject(*args, **kwargs)[source]

Return a subject. Override if you need templating or such.

subject = None

Email subject

class yell.backends.django.MultipartEmailBackend[source]

Send emails via django.core.mail.EmailMultiAlternatives

body = {}

Email body mapping content type to message. Requires at least a key for default_content_type.

default_content_type = 'text/plain'

The default content type.

class yell.backends.django.TemplatedEmailBackend[source]

Generates email bodies from templates.

Example :
class SignupMessage(TemplatedEmailBackend):
    name = 'signup'
    subject = "Welcome to %s" % Site.objects.get_current().name
    content_types = ['text/plain', 'text/html']

The SignupMessage class would look up following templates for the email body:

  • yell/signup.txt
  • yell/signup.html
content_types = (('text/plain', '.txt'), ('text/html', '.html'))

Default content types to render

get_body(*args, **kwargs)[source]

Render message bodies by using all the content types defined in content_types

get_path(name, ext)[source]

Get the path to a given template name. Override if you wish to store your templates in a custom folder outside of yell/.

Project Versions

Table Of Contents

This Page