From: Matthijs Kooijman Date: Fri, 1 Feb 2008 10:52:09 +0000 (+0100) Subject: * Rename email templates to .html. With any other extension, make-messages won't... X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=7e3d08fcecd7c510fda8b0ea5c3818342ebaa66c;p=matthijs%2Fprojects%2Fxerxes.git * Rename email templates to .html. With any other extension, make-messages won't recognoize them as templates... --- diff --git a/influences/notify.py b/influences/notify.py index 2bf7483..693863a 100644 --- a/influences/notify.py +++ b/influences/notify.py @@ -5,12 +5,12 @@ from ee.tools.notify import notify from django.contrib.auth.models import Group def character_saved(instance, created): - notify(instance.player, 'influences/email/character_changed', {'character' : instance, 'created' : created}) + notify(instance.player, 'influences/email/character_changed.hmtl', {'character' : instance, 'created' : created}) dispatcher.connect(character_saved, signals.post_save, Character) def influence_saved(instance, created): # TODO: Perhaps only notify when the status is / becomes Done? - notify(instance.character.player, 'influences/email/influence_changed', {'influence' : instance, 'created' : created}) + notify(instance.character.player, 'influences/email/influence_changed.html', {'influence' : instance, 'created' : created}) dispatcher.connect(influence_saved, signals.post_save, Influence) diff --git a/templates/influences/email/character_changed b/templates/influences/email/character_changed deleted file mode 100644 index 542250b..0000000 --- a/templates/influences/email/character_changed +++ /dev/null @@ -1,4 +0,0 @@ -From: Inschrijfsysteem -Subject: Character {{ character }} was changed. - -Pomtieflomptie diff --git a/templates/influences/email/character_changed.html b/templates/influences/email/character_changed.html new file mode 100644 index 0000000..542250b --- /dev/null +++ b/templates/influences/email/character_changed.html @@ -0,0 +1,4 @@ +From: Inschrijfsysteem +Subject: Character {{ character }} was changed. + +Pomtieflomptie diff --git a/templates/influences/email/influence_changed b/templates/influences/email/influence_changed deleted file mode 100644 index 2e12da0..0000000 --- a/templates/influences/email/influence_changed +++ /dev/null @@ -1,18 +0,0 @@ -{% load i18n%}{% autoescape off %}From: Inschrijfsysteem -Subject: {% if created %}{% blocktrans %}Influence "{{ influence }}" submitted.{% endblocktrans %}{% else %}{% blocktrans %}Influence "{{ influence }}" was changed.{% endblocktrans %}{% endif%} - -{% filter wordwrap:72 %} -{% blocktrans with influence.created as creation_date %}You have submitted an influence on {{ creation_date }}.{% endblocktrans %} -{% if not created %}{% blocktrans %}The influence has been modified. The current status is{%endblocktrans %}:{% else %}{% blocktrans %}You submitted{% endblocktrans%}:{% endif %} -{% endfilter %} -{% filter ljust:20%}{% trans "Character" %}:{%endfilter%}{{ influence.character }} -{% filter ljust:20%}{% trans "Contact" %}:{%endfilter%}{{ influence.contact }} -{% filter ljust:20%}{% trans "Summary" %}:{%endfilter%}{{ influence.summary }} -{% filter ljust:20%}{% trans "Status" %}:{%endfilter%}{{ influence.get_status_display }} -{% filter ljust:20%}{% trans "Long term" %}:{%endfilter%}{{ influence.longterm|yesno|capfirst }} -{% trans "Description" %}: -{% filter wordwrap:72 %}{{ influence.description }}{% endfilter %} -{% if influence.result %} -{% trans "Result" %}: -{% filter wordwrap:72 %}{{ influence.result }}{% endfilter %} -{% endif %}{% endautoescape %} diff --git a/templates/influences/email/influence_changed.html b/templates/influences/email/influence_changed.html new file mode 100644 index 0000000..2e12da0 --- /dev/null +++ b/templates/influences/email/influence_changed.html @@ -0,0 +1,18 @@ +{% load i18n%}{% autoescape off %}From: Inschrijfsysteem +Subject: {% if created %}{% blocktrans %}Influence "{{ influence }}" submitted.{% endblocktrans %}{% else %}{% blocktrans %}Influence "{{ influence }}" was changed.{% endblocktrans %}{% endif%} + +{% filter wordwrap:72 %} +{% blocktrans with influence.created as creation_date %}You have submitted an influence on {{ creation_date }}.{% endblocktrans %} +{% if not created %}{% blocktrans %}The influence has been modified. The current status is{%endblocktrans %}:{% else %}{% blocktrans %}You submitted{% endblocktrans%}:{% endif %} +{% endfilter %} +{% filter ljust:20%}{% trans "Character" %}:{%endfilter%}{{ influence.character }} +{% filter ljust:20%}{% trans "Contact" %}:{%endfilter%}{{ influence.contact }} +{% filter ljust:20%}{% trans "Summary" %}:{%endfilter%}{{ influence.summary }} +{% filter ljust:20%}{% trans "Status" %}:{%endfilter%}{{ influence.get_status_display }} +{% filter ljust:20%}{% trans "Long term" %}:{%endfilter%}{{ influence.longterm|yesno|capfirst }} +{% trans "Description" %}: +{% filter wordwrap:72 %}{{ influence.description }}{% endfilter %} +{% if influence.result %} +{% trans "Result" %}: +{% filter wordwrap:72 %}{{ influence.result }}{% endfilter %} +{% endif %}{% endautoescape %}