Comments (5)
Interesting. What are the major benefits of using django-templated-email
? We already run the subject_template
and body_html_template
through the full Django template system which has include
, load
, extends
, blocks
and all other tags are all accounted for. I think I am missing something here!
from django-drip.
Yeah, it could just be us, that's a decent solution, but it could get annoying to not easily be able to search all templates and edit them all at the same time in something like vi, though I do understand that not all companies have content creators that know enough and are trusted enough to be able to play around in the codebase without breaking anything.
Also, I don't know if automatically converting html -> text rather than the other way around, or better, explicitly defining both, is the right way to go. The issue being if you want to have <a href="very long link">Unsubscribe</a>
in html and Unsubscribe: very long link
in plain text, that's impossible with all but the last case, and in fact, any links at all have to be in the format <a href="very long link">very long link</a>
for all but the last case.
from django-drip.
Good call on the link bit, I'll open an issue on that (opened issue #9).
from django-drip.
I've got a similar customization need in a closely-related area: in my case I need to be able to customize the email class that is used for creating the email message. (For specifics, I'm trying in integrate use of django-drip with https://github.com/brack3t/Djrill, and in order to take advantage of any Mandrill stuff I need drip to build emails that are DjrillMessage instances rather than EmailMultiAlternatives). I was thinking of possibly proposing an ability to specify a custom class to use instead of EmailMultiAlternative, but seeing this request for template decoupling I wonder if one point of customization could serve both these needs.
What would you think of an approach that involved factoring out much of what build_email does into an independent class (which would be the default class used by django-drip, but could be overridden via settings). This class would be handed the user and drip instances, and would have methods to retrieve context (maybe?), subject, (html) body, plain text version, and to retrieve the email message instance with a send() method. build_email could then just defer to this class for the specifics of the email that is created, and users could customize the email content by subclassing the default class and overriding any of the methods where they need behavior different than default. build_email would still be responsible for doing the SentDrip creation and calling send() on the retrieved email instance, if necessary.
from django-drip.
Closed the PR associated, sorry for the silence for so long! Please reopen or make a new issue w/ reference if we want to continue the convo here!
from django-drip.
Related Issues (20)
- Rationale for groups exclusion in get_fields? HOT 1
- Django 1.2.x support? HOT 5
- Exception when viewing the email in Admin
- PyPI package doesn't include templates HOT 1
- namespace conflict with mock HOT 2
- Use AUTH_USER_MODEL in models. HOT 2
- Timeline shows same user multiple times HOT 1
- common samples in documentation for commone tasks HOT 1
- Timeline button does not work in 1.5.4 HOT 2
- Exclude users, i.e. support for unsubscribing HOT 3
- It's time for a new release HOT 5
- Python 3 support HOT 4
- Any plans to return django-drip back to live? HOT 1
- Several test fail since AUTH_PROFILE_MODULE (deprecated) is not set. HOT 1
- Drip breaks with Django 1.8 HOT 4
- Error running manage.py migrate HOT 1
- readthedocs version is old (0.1.3)
- Cannot Run Tests with Django 1.8.4 HOT 1
- ManyToManyRel' object has no attribute 'parent_model HOT 1
- Can't install drip on django 1.11.5 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-drip.