zulip/templates/zerver/test_emails.html
Rishi Gupta 69e7029663 test_emails: Use zerver.lib.send_email for rendering email.
Previously the rendering code in test_emails.py did not match the rendering
code in send_email.py. This commit removes the duplication to reduce the
chance they drift in the future.

This commit also changes test_emails.html to ensure that we always display
both the HTML and text versions of an email.
2017-06-09 23:34:24 -07:00

19 lines
513 B
HTML

{% extends "zerver/base.html" %}
{% block content %}
<div class="container">
{% for email in emails %}
<h3>Test for {{email.template}}</h3>
{% if email.failed %}
<p>Email failed to render: {{ email.reason }}</p>
{% else %}
<h4>Subject: {{email.subject}}</h4>
{% autoescape off %}
{{ email.html_message }}
{% endautoescape %}
<pre>{{ email.body }}</pre>
{% endif %}
{% endfor %}
</div>
{% endblock %}