1

I've searched and searched and the usual response seems to be "set debug and template_debug to True".

However. I'm generating mails for notification purposes and I have a small class that handles the template rendering as well are the creation of the EmailMessage object afterwards(for DRY reasons in regards to html content etc).

The thing is that I would like to log any rendering errors so that I can analyze them elsewhere. There's a lot of different mails to be sent out with a lot of different variables based on dates, memberships, permissions etc. And I would like to know if a variable was missing while rendering..

Right now I have to regularly check Mandrill (where they store the content of mails for up to 30 days) so see if all mails have all the relevant data..

I know I could go the unit test way - but that seems a bit much when all I wan't to do is to catch any errors unobtrusively.

What do you think? Am I way off in how this could be handled??

Peter Møller
  • 147
  • 1
  • 15

0 Answers0