Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
Saurabh Agrawal, I am not sure either. That's why I wanted to check if manually the API results are the same. The created keyword returns true so it HAS to have been run after save(). On Wed, 21 Nov 2018 at 15:37, Saurabh Agrawal wrote: > I am sorry, maybe I am understanding wrong, but isn't log

Re: How to correct my signals call?

2018-11-21 Thread Pradeep Singh
how to use placeholder in model based form On Wed, 21 Nov 2018 at 19:56, Pradeep Singh wrote: > how to use place in model based form > > On Wed, 21 Nov 2018 at 19:08, Saurabh Agrawal > wrote: > >> I am sorry, maybe I am understanding wrong, but isn't log as expected? >> >> Since the signal is r

Re: How to correct my signals call?

2018-11-21 Thread Pradeep Singh
how to use place in model based form On Wed, 21 Nov 2018 at 19:08, Saurabh Agrawal wrote: > I am sorry, maybe I am understanding wrong, but isn't log as expected? > > Since the signal is run synchronously within the Django request, "POST > /adminapp/merchantstores/add/" gets logged, only after t

Re: How to correct my signals call?

2018-11-21 Thread Saurabh Agrawal
I am sorry, maybe I am understanding wrong, but isn't log as expected? Since the signal is run synchronously within the Django request, "POST /adminapp/merchantstores/add/" gets logged, only after the signal has finished running. On Wed, Nov 21, 2018 at 6:55 PM Yavin Aalto Arba wrote: > if crea

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
if created is true it means that the signal is being sent AFTER the instance was saved(I am assuming this is a new object and not an update!) weird. ...what happens when you manually do an MerchantStores.objects.create(...) call with all the mandatory details? On Wed, 21 Nov 2018 at 12:33, prate

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
I just printed the value of created as kwargs.get("created") And it''s vaulue is True. On Wednesday, November 21, 2018 at 3:19:56 PM UTC+5:30, Yavin Aalto Arba wrote: > > Something doesn't add up. Can you check the ["created"] keyword? What does > it say? > > On Wed, 21 Nov 2018 at 11:26, pr

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
Can you please clear where you saw ["created"] keyword? On Wednesday, November 21, 2018 at 3:19:56 PM UTC+5:30, Yavin Aalto Arba wrote: > > Something doesn't add up. Can you check the ["created"] keyword? What does > it say? > > On Wed, 21 Nov 2018 at 11:26, prateek gupta > wrote: > >> @Yavin A

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
@Yavin Aalto Arba I am using models.py, admin.py for my view, no any customized forms or view. [image: screen_3.JPG] [image: screen_2.JPG] [image: screen_1.JPG] PFA screen shot for the same. On Wednesday, November 21, 2018 at 2:46:41 PM UTC+5:30, Yavin Aalto Arba wrote: > > Can you show us th

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
Can you show us the view where the save() is invoked? On Wed, 21 Nov 2018 at 10:57, prateek gupta wrote: > Hi All, > > I have an admin panel built on Django 2.0.6, Mysql 5.7 and Python 3.6. > > Now I have written following signal code in signals.py- > from .models import MerchantStores > from dj

How to correct my signals call?

2018-11-21 Thread prateek gupta
Hi All, I have an admin panel built on Django 2.0.6, Mysql 5.7 and Python 3.6. Now I have written following signal code in signals.py- from .models import MerchantStores from django.db.models.signals import post_save from django.dispatch import receiver @receiver(post_save, sender = MerchantStor