Acts as a lamson.mail.MailResponse generator that produces a properly
formatted HTML mail message, including inline CSS applied to all HTML
tags.
|
|
__init__(self,
css_template,
html_template,
variables={},
wiki=markdown)
You pass in a CleverCSS template (it'll be run through the template
engine before CleverCSS), the html_template, and any variables that
the CSS template needs. |
source code
|
|
|
|
load_css(self,
css_template,
variables)
If you want to change the CSS, simply call this with the new CSS and
variables. |
source code
|
|
|
|
reduce_tags(self,
name,
tags)
Used mostly internally to find all the tags that fit the given CSS
selector. |
source code
|
|
|
|
apply_styles(self,
html)
Used mostly internally but helpful for testing, this takes the given
HTML and applies the configured CSS you've set. |
source code
|
|
|
|
render(self,
variables,
content_template,
pretty=False)
Works like lamson.view.render, but uses apply_styles to modify the
HTML with the configured CSS before returning it to you. |
source code
|
|
|
|
respond(self,
variables,
content,
**kwd)
Works like lamson.view.respond letting you craft a
lamson.mail.MailResponse immediately from the results of a
lamson.html.HtmlMail.render call. |
source code
|
|
|
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|