Skip to content

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

Open
racitup wants to merge 2 commits into
awesto:masterfrom
racitup:textemail
Open

Improved text email formatting & updated patch to post_office v3.0.3#668
racitup wants to merge 2 commits into
awesto:masterfrom
racitup:textemail

Conversation

@racitup

@racitup racitup commented Oct 23, 2017

Copy link
Copy Markdown
Collaborator

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

@jrief

jrief commented Oct 23, 2017

Copy link
Copy Markdown
Member

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

racitup commented Oct 23, 2017

Copy link
Copy Markdown
Collaborator Author

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.

2 participants