Git Product home page Git Product logo

Comments (3)

kmtracey avatar kmtracey commented on September 13, 2024

I was curious if you had any pointers on how you were thinking of approaching this? I have a need to send users email on creation of "any specified model"...so not necessarily user User creation. For my needs (at least now), it is just model instance creation that would need to trigger email, so post_save is the only signal I'd need to support. I do need to have the admin interface allow the admin to choose the model that would trigger the drip. So one drip might be associated with the creation of new Articles while another might be associated with the creation of new BlogPosts.

For my current needs, adding a ForeignKey to a ContentType into the Drip model, a post_save signal handler connection, and the signal handler itself seem sufficient to accomplish what I'm looking for, but far less ambitious than what seems to be envisioned for this issue...so I was wondering what thoughts you might have already had on how to add general "trigger on signal" support? Essentially I'm wondering if I can fit my needs into the approach you may have been thinking of taking, and thus try to feed back work I do for my project into building out this feature.

from django-drip.

kmtracey avatar kmtracey commented on September 13, 2024

For reference, this: caktus@1d0c9e4 accomplishes what I need in terms of signal triggers. But it's seems more limited than what's envisioned here so I'm not sure how well it would fit in with the overall direction you were thinking of taking for this feature?

from django-drip.

bryanhelmig avatar bryanhelmig commented on September 13, 2024

Ideally drip would maintain a list of available signals (though it is likely post_save would be the most common). There would be a new model called Trigger that would represent both querysets (like we do already) but also let you register to signals (and the sender Model for post_save) as well. Drip would connect to that signal, and each time it receives the signal it would do a query to see if there are any drips to be sent.

The problem with this is it is done inline with the signal, meaning it is rather expensive. Much better would be a task that gets dumped into a queue. This is all a rather complicated process TBH, not sure if it is worth it...

from django-drip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.