diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2015-03-30 14:53:15 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2015-03-30 14:53:15 +0200 |
commit | 3ab1ecc36d3e58a0f3ac7fbe05330a956b802f0e (patch) | |
tree | 895367429cdba89e5deac9133a90ca687f5cef6a | |
parent | 34a81a16555e59949262cebf81a9cb29779d543e (diff) |
Use htmlmin to minify HTML email body.
-rw-r--r-- | app/utils/report/boot.py | 3 | ||||
-rw-r--r-- | requirements.txt | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/utils/report/boot.py b/app/utils/report/boot.py index e6fbcd9..13560f3 100644 --- a/app/utils/report/boot.py +++ b/app/utils/report/boot.py @@ -14,6 +14,7 @@ """Create the boot email report.""" import gettext +import htmlmin.minify import itertools import jinja2 import pymongo @@ -522,7 +523,7 @@ def _create_html_email(**kwargs): loader=jinja2.FileSystemLoader(rcommon.TEMPLATES_DIR)) html_body = template_env.get_template("boot.html").render(**kwargs) - return html_body + return htmlmin.minify.html_minify(html_body) def _create_txt_email(**kwargs): diff --git a/requirements.txt b/requirements.txt index c00a217..13aa08c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,3 +13,4 @@ sphinx-bootstrap-theme sphinxcontrib-httpdomain tornado==3.2.2 jinja2 +django-htmlmin |