worthwhile / django-herald

A Django messaging library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for autogenerating text/ascii notifications

george-silva opened this issue · comments

Hello everyone! Great project!

I'm using it in production for one our SaaS and it's working nicely.

One of the things I've just learned about today is https://pypi.python.org/pypi/html2text.

There is a big hassle in creating and maintaining two sets of templates, one for html and one for txt. Perhps we could integrate with html2text and auto-generate the text emails, when the txt template is not available?

I can contribute, but I would like to know how you feel about that, before starting it.

I think that would be a great feature! The issue is sometimes the auto generated version is not very pretty. But I think that it would be nice to default to the auto generated version if no text template exists.

I mean, for the most part, it will probably be ok.

There's one caveat designing the plain text emails regarding the use of django tags, like for and ifs. If you keep breaking lines, for easy modification/understading, they will show up on the plain email, which is a pain to modify, leading to very long lines inside your template...

Well, I'll start cracking on this sometime next week or so. It will save me more time to implement this instead of designing two sets of emails. Great :D

@george-silva thanks so much! I've assigned this over to you!

We implemented this at work and could share back. It uses html2text if people are ok with adding that as a dependency. I'd be happy to make a PR.

@peterfarrell feel free. Add it into the extras_require section

@raiderrobert Working on a PR this week including updates to docs and tests.