def subject_template(template, context):
 subject = loader.get_template(template).render(Context(context))
 return u' '.join(subject.splitlines()).strip()

def subject_template ( template , context ) : subject = loader . get_template ( template ) . render ( Context ( context ) ) return u' ' . join ( subject . splitlines ( ) ) . strip ( )
loads and renders an email subject template .