Re: Query Regarding Django Signals

2018-05-05 Thread Ruhia gr
 hello everyone m new to django and am starting my ecommerce project in
djnago .please anyone suggest which is best for ecommerce project(online
shopping)django or django cms

On Sat, May 5, 2018 at 11:55 AM, Nipun Arora  wrote:

> okay thanks people..!
>
> On Friday, May 4, 2018 at 9:40:12 PM UTC+5:30, Nipun Arora wrote:
>>
>> Hello Community
>>
>> I 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 db
>>Do 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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
> 
> .
>
> 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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CAG5%3DJHc%2B%2B%3D5XtDWLfRPzzyG8g1GbNuEVsfJe_h%2B-G%3DG%2BZWft%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Query Regarding Django Signals

2018-05-05 Thread Nipun Arora
okay thanks people..!

On Friday, May 4, 2018 at 9:40:12 PM UTC+5:30, Nipun Arora wrote:
>
> Hello Community 
>
> I 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 db 
>Do 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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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.
For more options, visit https://groups.google.com/d/optout.


Re: Query Regarding Django Signals

2018-05-04 Thread jacob duyon
You can also just write a Celery task to do your async stuff and trigger it
from signals.py

On Fri, May 4, 2018 at 4:13 PM, Jani Tiainen  wrote:

> 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"  kirjoitti:
>
> Hello Community
>
> I 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 db
>Do 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@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%3D1bUa46fckK4ositA38TpiuO30cQE
> sx%2B-pqZPqvg%40mail.gmail.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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/CAJsZ3R5H%2BHjO9uOEYfsPXV1p6TmE9cvDgtq8ayMyVkc-xbDEqg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Query Regarding Django Signals

2018-05-04 Thread Jani Tiainen
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"  kirjoitti:

Hello Community

I 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 db
   Do 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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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.
For more options, visit https://groups.google.com/d/optout.


RE: Query Regarding Django Signals

2018-05-04 Thread Matthew Pava
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.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Nipun Arora
Sent: Friday, May 4, 2018 10:37 AM
To: Django users
Subject: Query Regarding Django Signals

Hello Community

I 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 db
   Do 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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@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<https://groups.google.com/d/msgid/django-users/5b64f4e4-afa2-485b-96a9-825b3c93b95e%40googlegroups.com?utm_medium=email_source=footer>.
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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/10a41cd61e124053ae127bc226ce72fc%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Query Regarding Django Signals

2018-05-04 Thread Nipun Arora
Hello Community 

I 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 db 
   Do 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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@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.