django-shop icon indicating copy to clipboard operation
django-shop copied to clipboard

Improved text email formatting & updated patch to post_office v3.0.3

Open racitup opened this issue 6 years ago • 2 comments

I had to change the patch method as the current method of replacing the manager didn't work for me.

racitup avatar Oct 23 '17 00:10 racitup

With which version of Django did you test this? Since html_to_text is a non-trivial function, I'd like to see a unit-test, so that I can be sure, that it works across all versions of Django and Python.

Is there any blueprint on how to convert HTML to plain text, suitable for emails. With that I mean formatting long lines, creating tables, etc. This is something non-trivial and probably the best solution is still writing those templates by hand.

jrief avatar Oct 23 '17 12:10 jrief

I've used it on python 3.5 and 2.7 and Django 1.10.7. There is a test here. Would I put that into example/tests?

I haven't found any more useful information of converting html to text other than that function, which I enhanced from a stackoverflow post. All I can say is it's an improvement over bs.text

racitup avatar Oct 23 '17 19:10 racitup