prologin / concours-site

Source code of the Prologin contest website
https://gitlab.com/prologin/concours/site
GNU General Public License v3.0
10 stars 6 forks source link

Template '*.html.html' does not exist #227

Closed alarsyo closed 2 years ago

alarsyo commented 5 years ago

The logs are filled with erros like these:

Nov 02 11:02:46 rosa.prologin.org gunicorn[846]: Template 'users/mails/pswd_reset.body.html.html' does not exists.
Nov 02 11:25:09 rosa.prologin.org gunicorn[846]: Template 'users/mails/pswd_reset.body.html.html' does not exists.
Nov 02 11:48:40 rosa.prologin.org gunicorn[846]: Template 'users/mails/activation.body.html.html' does not exists.
Nov 02 12:22:33 rosa.prologin.org gunicorn[846]: Template 'users/mails/activation.body.html.html' does not exists.

This happens because djmail looks for a *.html.html template along with a plain text *.text.html template. From djmail's code there seems to be no way to disable sending of HTML emails.

Possible solutions include:

zopieux commented 5 years ago

Yes, this is a super old warning that I've elect to ignore because asking to provide blank files, instead of just no file at all, is a really poor API choice from djmail. I'd prefer djmail to support not providing some files. I wouldn't care too much about polluting logs. What you can do if you really care, is to blackhole djmail warnings, or maybe this one in particular if this can be expressed using Django/Python logging filtering.

juli0z commented 2 years ago

Migrated to https://gitlab.com/prologin/concours/site/-/issues/227