3 ms·
A while ago I worked on a library [1] to help send out notifications for a Django site. The notifications could be in various forms, but email was the most comm
by frenchy 6y ago
A while ago I worked on a library [1] to help send out notifications for a Django site. The notifications could be in various forms, but email was the most common. After a few prototypes, I quickly realized:
1. People don't want to bother proof-reading both the HTML & text version, so if they're kept separate, people will just update the HTML version and the text verison will get stale.
2. People don't want to learn Markdown (or ReST/etc) to render HTML from text.
3. Even if they did, the result quickly becomes strange and difficult to read in-text if you want fancy formatting.
4. On top of that, templating is troublesome for anything not html/text. Escaping requires special support that Django doesn't have.
The only effective solutions I could think of are are a) don't provide a text version b) automatiatically generate the text version from the HTML version. I ended up picking b, and it worked okay, though it's still easy to fool it with bad HTML (like an image with a non-sensical alt value).
[1] https://pypi.org/project/django-vox/ https://pypi.org/project/django-vox/
- leephillips 6y agoIsn’t the obvious solution to only provide a text version? I’d rather get an email notification as un-marked-up text.
- mandelbrotwurst 6y agoYour preference is likely not similar to that of their typical users. At this point, I'd expect many people receiving text only e-mail from a corporate mailing list or something like that to consider it broken and/or suspicious.
- frenchy 6y agoI would personally prefer this too, but there's a lot of people who don't, for good reasons and for bad ones. I strongly prefer the UI on "Hacker News" to what you get on Twitter or new Reddit, but it's also pretty clear to me most other people don't. I think they ought to, but they don't.