re: Django transactional emails made easy VIEW POST

re: I personally prefer having it in one file, but that's just a personal preference. How do you deal with subject lines? In the past I've had to have ...

As the subjects don't contain any template information, I am passing them to my email sending function as simple strings from the view or from the form.

IMHO subjects should be more than just simple strings. They're the first thing the user sees when they get the email and I want it to be as informative as possible.

For example if they have a single notification it might read "Aidas Bendoraitis commented on your post" if there are multiple comments it might read "3 people commented on your post" if there is more than one kind of notification it might read "You have 4 new messages".

You could of course generate those kind of strings in your view function, but I prefer to have it in the template rather than code.

OK. I see the point. Worth consideration :)

Code of Conduct Report abuse