Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

racitup
Copy link
Collaborator

@racitup racitup commented Oct 23, 2017

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

@jrief
Copy link
Member

jrief commented Oct 23, 2017

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.

@racitup
Copy link
Collaborator Author

racitup commented Oct 23, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants