The advantage with the signals is that you can put all that code in one place. You may have different views that are saving the same model, and it isn’t DRY to have to put that same code in multiple locations.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
django-users...@googlegroups.com.
To post to this group, send email to
django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/5b64f4e4-afa2-485b-96a9-825b3c93b95e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,Signals are also good for decoupling things.For example you want to do some post save action for third party models.
4.5.2018 19.10 "Nipun Arora" <aroran...@gmail.com> kirjoitti:
Hello CommunityI was puzzled by the fact that if django signals are not asynchronous why do we use them as in when ever i want some trigger on post_save can't i simply write that particular trigger in the same function that handles the request for saving a new object in django views..?as in :def handlerequest(Request):save instance to dbDo the work i would do in the method handling the signal post_save
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5b64f4e4-afa2-485b-96a9-825b3c93b95e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHn91odCSN%3D1bUa46fckK4ositA38TpiuO30cQEsx%2B-pqZPqvg%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/83734488-12d6-4bfa-9e6f-b2b12556eff9%40googlegroups.com.