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

dynamic subscription

Open newearthmartin opened this issue 4 years ago • 2 comments
trafficstars

Hi @dokterbob et al!

I'm thinking of a new feature and would like to get your feedback on it. I'm going to do it on my own repo but I think it can be useful for others and could be merged.

The feature is a dynamic/subscriptionless newsletter. The idea is to have code that dynamically chooses who to send messages to, at the moment of submitting a message. This can be done two ways:

  • Use an existing newsletter and add a filter_class option to the Message. This filter class will have a method that returns True or False on subscriptions and this will be used to dynamically select who receives this message
  • Add a new type of Newsletter that doesn't have Subscription objects but rather a subscription_generator_class that dynamically produces the list of recipients that should get the message.

Either of these dynamic mechanisms will be triggered when the message is submitted.

Would love to have your feedback, any potential issues that I'm not seeing, etc

newearthmartin avatar Jan 31 '21 15:01 newearthmartin

would love to see your pull request

woodz- avatar Feb 03 '21 01:02 woodz-

@dokterbob @woodz-

Hi! I created a PR for this feature https://github.com/jazzband/django-newsletter/pull/367

newearthmartin avatar Mar 27 '21 04:03 newearthmartin