pmclanahan / django-celery-email

A Django email backend that uses a celery task for sending the email.
BSD 3-Clause "New" or "Revised" License
477 stars 110 forks source link

simplify dict_to_email #57

Closed pawl closed 5 years ago

pawl commented 5 years ago

This PR attempts to simplify dict_to_email by removing and saving the items from messagedict in one loop (based on a list items that will be message attributes). I did something similar with setting the attributes on the message object too. I also tried to improve some of the variable names (ret -> message, etc) and add some comments.

This also removes some dead code: