Using Signals and method in models to automate key and qrcode>> help

2021-04-17 Thread Tal Bar-Or
created and the pyotp code, on evry user creation i have signals receivers that create the additional profile associated tables , but i need your advice ,on methods attached to the model that will create automatically the request tables , what is the best practice to achieve such task. Please

use signals in channels2 - send message when a database field is updated

2019-11-23 Thread Levent Engin
Hi; How can i implement to use signals inside channels2? I want to send message via consumer when a database field is updated. Wiil that be inside consumer or models? Is there a sample or tutorial? Best regards -- You received this message because you are subscribed to the Google Groups

Django Signals - trigger when model changed

2019-10-05 Thread Omar Helal
Hi all, I came across this ticket in stack overflow to try to find a solution for the issue of calling a signal only when a particular field on a model was updated. https://stackoverflow.com/questions/39034798/django-signals-for-models-value-change-condition I didn't want to use any third

Re: Signals with update()

2019-06-25 Thread Yoo
If what I said is confusing, let me know where. I've been stuck on this for a looonngg time. On Tuesday, June 25, 2019 at 10:34:25 AM UTC-4, Yoo wrote: > > Hi, I have a problem with updating in Django signals regarding a specific > use-case hierarchy: > > https://gist.github.

Signals with update()

2019-06-25 Thread Yoo
Hi, I have a problem with updating in Django signals regarding a specific use-case hierarchy: https://gist.github.com/andrewcw825/90375d77578afea23ec4886f18e063b4 Hi, so here's the problem: once the objects for Public1 are created, I need to update each object in the queryset of Private1 of a1

Signals

2019-06-16 Thread Yoo
of a certain table with url_id). I'm not sure where to go with this. I was thinking of using signals to find the latest number used, then update it by incrementing last_number by one, then sending another signal back for Stuff1 or Stuff2 to save in url_id. Not only that, but what would the signal

Re: Using signals to populate another model based on new registered user

2019-03-10 Thread Kevin Jay
ployee.econtact }} >>27. >>28. >"glyphicon glyphicon-pencil" >Edit >>29. Delete >>30. >>31. >>32. {% endfor %} >>33. >>34. >>35. >

Re: Using signals to populate another model based on new registered user

2019-03-10 Thread Kevin Jay
or %} >33. >34. >35. >36. >37. >Add New Record >38. >39. > > >> On Sun, Mar 10, 2019 at 10:06 AM Deepak sharma wrote: > Simple Answer: DON'T . Resort to signals only when there is No > Alternatives left. > Using

Re: Using signals to populate another model based on new registered user

2019-03-10 Thread Deepak sharma
Simple Answer: DON'T . Resort to signals only when there is No Alternatives left. Using Signals looks tempting but as project grows, it really becomes a Mess to manage each of them. One simply becomes a confused and debugging becomes a real Hell. I suffered from this Problem. hence recommends

Using signals to populate another model based on new registered user

2019-03-09 Thread Gavin Boyle
Hi all, I am new to working with signals and triggers, what I am trying to accomplish is: 1. When a new user registers, I have another model to deal with subscriptions. 2. I want to create an instance for that subscription model with all the default values based on the new user. 3

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
;>>>> def ensure_store_id_exists(sender, **kwargs): >>>>>>>print ("check fucntion") >>>>>>>ex = kwargs.get("instance").store_id >>>>>>>print ("store id:",ex) >>>>>>>

Re: How to correct my signals call?

2018-11-21 Thread Pradeep Singh
als import post_save >>>>>>>> from django.dispatch import receiver >>>>>>>> >>>>>>>> @receiver(post_save, sender = MerchantStores, weak=False) >>>>>>>> def ensure_store_id_exists(sender, **kwargs): >>

Re: How to correct my signals call?

2018-11-21 Thread Pradeep Singh
from django.dispatch import receiver >>>>>>> >>>>>>> @receiver(post_save, sender = MerchantStores, weak=False) >>>>>>> def ensure_store_id_exists(sender, **kwargs): >>>>>>>print ("check fucntion") >>>>>

Re: How to correct my signals call?

2018-11-21 Thread Saurabh Agrawal
id:",ex) >>>>>>import requests >>>>>>URL = "http://example.cloud/rmsservice/resetPin?storeId="+str(ex) >>>>>>print("url:",URL) >>>>>>data = {'Content-Type': 'application/json', >>>>>>

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
_id >>>>>print ("store id:",ex) >>>>>import requests >>>>>URL = "http://example.cloud/rmsservice/resetPin?storeId="+str(ex) >>>>>print("url:",URL) >>>>>data = {'Content-Type

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
>>>>print("url:",URL) >>>>data = {'Content-Type': 'application/json', >>>>'app-id': 'APP_ID', >>>>'secret-key': 'SECRET_KEY', >>>>'aid': 'PG'} >>>> >>>>r = requests.post

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
t;,URL) >>>>data = {'Content-Type': 'application/json', >>>>'app-id': 'APP_ID', >>>>'secret-key': 'SECRET_KEY', >>>>'aid': 'PG'} >>>> >>>>r = requests.post(url=URL, headers=data) >>&g

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
>> >> And in apps.py I have done following settings- >> >> from django.apps import AppConfig >> >> class AdminappConfig(AppConfig): >> name = 'adminapp' >> >> def ready(self): >> import adminapp.signals >> >> >> In abov

Re: How to correct my signals call?

2018-11-21 Thread Yavin Aalto Arba
'secret-key': 'SECRET_KEY', >'aid': 'PG'} > >r = requests.post(url=URL, headers=data) >response_text = r.text >print(response_text) > > And in apps.py I have done following settings- > > from django.apps import AppConfig > > class Ad

How to correct my signals call?

2018-11-21 Thread prateek gupta
ettings- from django.apps import AppConfig class AdminappConfig(AppConfig): name = 'adminapp' def ready(self): import adminapp.signals In above signals I am sending a post request to resetPin api. I need to send the request once form is saved but my signal is posting request before

RE: How can I implement built in signals, for my app?

2018-10-22 Thread Matthew Pava
entsConfig', ...] -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Joel Mathew Sent: Sunday, October 21, 2018 11:51 AM To: django-users@googlegroups.com Subject: How can I implement built in signals, for my app? How to implement built

How can I implement built in signals, for my app?

2018-10-21 Thread Joel Mathew
How to implement built in signals, for my app? I have a project myappointments, with two apps appointments and clinic in it. Objective: When a user logins, details should be entered in the database. appointments/models.py: class Event(models.Model): id=models.AutoField(primary_key

Re: Signals and Profile Update

2018-09-17 Thread carlos
hello the only thing you can do is compare dates of storage of the information and then check if the current date is greater than the saved date is an update On Mon, Sep 17, 2018 at 10:08 AM 'dtdave' via Django users < django-users@googlegroups.com> wrote: > I have a Custom User Model and a

Signals and Profile Update

2018-09-17 Thread 'dtdave' via Django users
I have a Custom User Model and a separate Profile Model with django all-auth. The following signal creates the profile for the user and then informs the admin that a new user has registered. @receiver(post_save, sender=User) def create_user_profile(sender, **kwargs): '''Create a profile

Django signals created kwargs is True while updating

2018-07-24 Thread Aamu Padi
I think I am missing something here, but here it goes. I have a model, and it is a sender for a post_save signal. class Book(models.Model): ... created_at = models.DateTimeField(default=timezone.now) bought = models.BooleanField(default=False) @receiver(post_save, sender=Book) def

Re: Is there any way to disable dispatching of signals?

2018-07-19 Thread Melvyn Sopacua
On donderdag 19 juli 2018 18:22:46 CEST lorin...@gmail.com wrote: > Is there any way to disable dispatching of signals? > If not, I truly truly think there should be a way to do it :) > > Possible use cases: > - Prevent signals being called recursively because the signal co

Re: Is there any way to disable dispatching of signals?

2018-07-19 Thread Jason
deciding whether to act or not is really part of the signal handler, to be honest. -- 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

Is there any way to disable dispatching of signals?

2018-07-19 Thread lorinkoz
Is there any way to disable dispatching of signals? If not, I truly truly think there should be a way to do it :) Possible use cases: - Prevent signals being called recursively because the signal code dispatched the same signal. - Disable for scripts or management commands - Just bypass

Re: Query Regarding Django Signals

2018-05-05 Thread Ruhia gr
n 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

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 wri

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 <rede...@gmail.com> wrote: > Hi, > > Signals are also good for decoupling things. > > For example you want to do some post save action f

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" <aroranipu...@gmail.com> kirjoitti: Hello Community I was puzzled by the fact that if django signals are not asynchronous wh

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

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

Re: Channels with django signals

2018-02-03 Thread John Wayne
Oh I saw that you fixed it recently. Thank you anyway :) On Sunday, February 4, 2018 at 1:22:58 AM UTC+1, Andrew Godwin wrote: > > Hi John, > > This is fixed in the asgiref master branch, I should be releasing it soon. > > Andrew > > On Sat, Feb 3, 2018 at 4:14 PM, John Wayne

Re: Channels with django signals

2018-02-03 Thread Andrew Godwin
Hi John, This is fixed in the asgiref master branch, I should be releasing it soon. Andrew On Sat, Feb 3, 2018 at 4:14 PM, John Wayne wrote: > Hi everyone, > > I am trying to send a channels message from a django signal. The problem > ist that the signal function is

Channels with django signals

2018-02-03 Thread John Wayne
Hi everyone, I am trying to send a channels message from a django signal. The problem ist that the signal function is not async. So I tried to use the AsyncToSync wrapper. But it seems this is not possible as the signal handler is run by a thread and has no event loop. ...

Re: A question of signals and ATOMIC_REQUESTS

2018-01-31 Thread Me Sulphur
18 at 12:54:29 AM UTC-5, Me Sulphur wrote: >> >> When ATOMIC_REQUESTS=True is set, are ORM signals - post_save and >> pre_save - also executed within the transaction? Per my inference, they >> seem be to a part of the transaction. >> >> Assuming my inference i

Re: A question of signals and ATOMIC_REQUESTS

2018-01-31 Thread Jason
It seems that your inference is correct https://stackoverflow.com/a/41522066/214892 On Wednesday, January 31, 2018 at 12:54:29 AM UTC-5, Me Sulphur wrote: > > When ATOMIC_REQUESTS=True is set, are ORM signals - post_save and > pre_save - also executed within the transaction? Per my

A question of signals and ATOMIC_REQUESTS

2018-01-30 Thread mesulphur
When ATOMIC_REQUESTS=True is set, are ORM signals - post_save and pre_save - also executed within the transaction? Per my inference, they seem be to a part of the transaction. Assuming my inference is correct, then consider the following code @receiver(post_save, sender=MyModel) def

Re: Django signals **kwargs

2017-06-27 Thread yingi keme
Okkk.. Thanks Vijay.. Yingi Kem > On 27 Jun 2017, at 9:53 PM, Vijay Khemlani <vkhem...@gmail.com> wrote: > > Same link > > https://docs.djangoproject.com/en/1.11/ref/signals/#post-save > > post_save¶ > > django.db.models.signals.post_save¶ >

Re: Django signals **kwargs

2017-06-27 Thread Vijay Khemlani
Same link https://docs.djangoproject.com/en/1.11/ref/signals/#post-save post_save¶ <https://docs.djangoproject.com/en/1.11/ref/signals/#post-save> django.db.models.signals.post_save¶ <https://docs.djangoproject.com/en/1.11/ref/signals/#django.db.models.signals.post_save> Like pre

Re: Django signals **kwargs

2017-06-27 Thread yingi keme
Okk. But what i am actually asking is, what type of contents does the **kwargs. Give me a typical example of **kwargs in the context of signals. The actual data **kwargs may contain. Yingi Kem > On 27 Jun 2017, at 9:24 PM, Vijay Khemlani <vkhem...@gmail.com> wrote: &

Re: Django signals **kwargs

2017-06-27 Thread Vijay Khemlani
https://docs.djangoproject.com/en/1.11/topics/signals/#receiver-functions We’ll look at senders a bit later, but right now look at the **kwargs argument. All signals send keyword arguments, and may change those keyword arguments at any time. In the case of request_finished, it’s documented

Django signals **kwargs

2017-06-27 Thread yingi keme
So i want to know, when using a model signals. The reciever function has **kwargs. What is the content of **kwargs in this reciever function below: @reciever(post_save, sender=MyModel) def func(sender, instance, **kwargs): # some action. -- You received this message because you

Signals and dispatch uid

2017-01-28 Thread Melvyn Sopacua
Hello, I'm having a hard time figuring out both from docs and code what the best strategy is for preventing a loop, if in post_save() you need to save the provided instance. I'm implementing an ImageField that is able to handle multiple arbitrary thumbnail images. For that purpose I've

Re: Admin is still annoying regarding model save(), and model post_save signals.

2016-01-12 Thread Luis Masuelli
Notes: This is only annoying when the logic involves many2many fields. -- 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

Admin is still annoying regarding model save(), and model post_save signals.

2016-01-12 Thread Luis Masuelli
in pre_save and post_save signals, since they are many2many fields, they will be overriden on an admin form, since the form.save_m2m is called *after* the model save, and whatever changes I do on those signals, will be wiped out. The logic I had to put it in log_change (ModelAdmin method). I

Re: Working with Django signals

2016-01-06 Thread Bernardo Garcia
Hi luisza I've choose work overriding the save() method of the AbstractUser class, instead of apply the post_save() signal to the create_profile_for_new_use function. According to the prevouos mentioned, my User MedicalProfile, PatientProfile y PhisiotherapystProfile models stayed so:

Re: Working with Django signals

2015-12-31 Thread Luis Zárate
I suggest you to change the user creation form to set the three attributes that you need (Is medical, is physuitherapist, is patient), so in the first form (when you create the user) you will have usernarme, password, Is_medical, is_physuitherapist, is_patient. Take a look -

Working with Django signals

2015-12-30 Thread Bernardo Garcia
I have a custom users schema in Django for work with roles or users type, creating an application named userprofile which will be or will setup my custom user model. In my settings.py I have the following configuration: INSTALLED_APPS = [ ... 'userprofile',]#Custom model Users

Are django signals triggered within migrations?

2015-08-31 Thread Michael
Hi, I'm doing some data migrations (creating new model instances) in the migrations files and I have a couple of receivers on the `post_save` signal for the models I am creating instances. >From what I have seen, it seems that the signals are not triggered within the migration. Is that t

Testing Signals

2015-08-11 Thread Grant Means
fine if I test the module directly using ./manage.py test test_models.py. However if I run test or simply test the signals don't appear to connect. Using PyCharm I stepped through the code and found that when I call .connect() in my TestCase, and step into Signal.connect() I can see all

Re: Using Signals - request_finished

2015-02-26 Thread Rootz
thanks it worked On Thursday, February 26, 2015 at 5:54:02 AM UTC-5, Rodrigo Zayit wrote: > > put on your __init__.py file: > > from signals import request_finished_callback > > I guess it'll work. > > > Atenciosamente, > Rodrigo de Oliveira > > On Wed,

Re: Using Signals - request_finished

2015-02-26 Thread Rodrigo Zayit
put on your __init__.py file: from signals import request_finished_callback I guess it'll work. Atenciosamente, Rodrigo de Oliveira On Wed, Feb 25, 2015 at 6:21 PM, Rootz <arc4g...@gmail.com> wrote: > Still not working > > > On Wednesday, February 25, 2015 at

Re: Using Signals - request_finished

2015-02-25 Thread Rootz
Still not working On Wednesday, February 25, 2015 at 12:55:29 PM UTC-5, Rodrigo Zayit wrote: > > If it is being loaded and it is not working, try to do by this way: > > from django.core.signals import request_finished > from django.dispatch import receiver > > @receiver(request_finished)

Re: Using Signals - request_finished

2015-02-25 Thread Rootz
how do I load the signals file at the same point? On Wednesday, February 25, 2015 at 12:29:57 PM UTC-5, Vijay Khemlani wrote: > > is the signals.py module being loaded at some point? > > If it isn't, then the connect function is never being called. > > On Wed, Feb 25, 2015 at 2:

Re: Using Signals - request_finished

2015-02-25 Thread Rodrigo Zayit
If it is being loaded and it is not working, try to do by this way: from django.core.signals import request_finished from django.dispatch import receiver @receiver(request_finished) def request_finished_callback(sender, **kwargs): # . . . On Wednesday, 25 February 2015 14:01:24 UTC-3, Rootz

Re: Using Signals - request_finished

2015-02-25 Thread Vijay Khemlani
is the signals.py module being loaded at some point? If it isn't, then the connect function is never being called. On Wed, Feb 25, 2015 at 2:01 PM, Rootz wrote: > I have tried using the request_finished signal but nothing happens when I > tried testing it. > What

Using Signals - request_finished

2015-02-25 Thread Rootz
I have tried using the request_finished signal but nothing happens when I tried testing it. What suggestions or recommendations can I do to help fix the problem? Thank you. Below is a sample of the signals.py file (sample is taken from djangoproject.com ) ###SIGNALS.PY from

Re: Do Signals block Django process?

2015-01-31 Thread Tobias Dacoir
Thanks for the info about django-debug-toolbar. I will certainly test it. I assume that I do a quite a lot of slow queries, but during development I run with a very reduced dataset, so my database (sqlite too instead of mysql) only contains a couple of hundred entries whereas in deployment it

Re: Do Signals block Django process?

2015-01-30 Thread Babatunde Akinyanmi
your application. > Also what about my signal to process the badges. If I have a function that calls user.save(), which then signals to the badges module, will the execution of the original function stop until the signal has been processed or not? > > def myView(request): >do_s

Re: Do Signals block Django process?

2015-01-30 Thread Tobias Dacoir
Thanks for always answering my questions :) I did read the documentation on uWSGI and I think I have an understanding now of workers and threads (from Webserver or uWSGI) and how it handles multiple users. For the signals and badge calculation, I did see celery pop up a couple of times and I

Re: Do Signals block Django process?

2015-01-30 Thread Vijay Khemlani
s to spawn and handle incoming requests. As far as I know, signals are processed "in sync", that is, the original function is stopped until the signal has been processed. If you need async functionality you would need to take a look at celery or something along those lines. On Fri, Jan

Do Signals block Django process?

2015-01-30 Thread Tobias Dacoir
, so if two users are accessing the website, the 2nd has to wait until the request from the first user is processed? Also what about my signal to process the badges. If I have a function that calls user.save(), which then signals to the badges module, will the execution of the original function

Re: Difference between signals and celery

2013-12-01 Thread fchow
is may be a lame question, but I am really confused with these two. I > know *signals* are used to do some task when something has happened. But > what about celery? In the documentation it says: > > *Celery is an asynchronous task queue/job queue based on distributed > message passi

Re: Difference between signals and celery

2013-12-01 Thread Robin Lery
Daniel Ruvalcaba Valenzuela < >> clsdan...@gmail.com> wrote: >> >>> Signals are like events, for example, when the ORM has done an update. >>> Celery is more like a Task queue, you define code to execute certain task, >>> load it on celery task server which is run

Re: Difference between signals and celery

2013-11-30 Thread Avraham Serour
Celery needs a different server? > > > On Sat, Nov 30, 2013 at 12:41 AM, Carlos Daniel Ruvalcaba Valenzuela < > clsdan...@gmail.com> wrote: > >> Signals are like events, for example, when the ORM has done an update. >> Celery is more like a Task queue, you define code

Re: Difference between signals and celery

2013-11-30 Thread Robin Lery
Thank all so much for you replies. Just one more question though. Does this means Celery needs a different server? On Sat, Nov 30, 2013 at 12:41 AM, Carlos Daniel Ruvalcaba Valenzuela < clsdan...@gmail.com> wrote: > Signals are like events, for example, when the ORM has done an update.

Re: Difference between signals and celery

2013-11-29 Thread Carlos Daniel Ruvalcaba Valenzuela
Signals are like events, for example, when the ORM has done an update. Celery is more like a Task queue, you define code to execute certain task, load it on celery task server which is running separately from your django process, then when you need to execute it in the background you tell

Re: Difference between signals and celery

2013-11-29 Thread Nevio Vesic
The easiest answer I could give is that django signals are like hooks. Something you wish to preform AFTER or BEFORE some model action. Like you wish to adjust account balance on model save. Than you would use post_save builtin django signal. Celery is here to handle task in background. Like you

Difference between signals and celery

2013-11-29 Thread Robin Lery
This may be a lame question, but I am really confused with these two. I know *signals* are used to do some task when something has happened. But what about celery? In the documentation it says: *Celery is an asynchronous task queue/job queue based on distributed message passing

Re: Signals not working as expected

2013-11-29 Thread Robin Lery
Ok, thank you all! On Fri, Nov 29, 2013 at 9:56 PM, Robin Lery wrote: > Yes. > > > On Fri, Nov 29, 2013 at 9:55 PM, Robin Lery wrote: > >> Do i put the codes to all the app's - models.py? >> >> >> On Fri, Nov 29, 2013 at 9:44 PM, Tom Evans

Re: Signals not working as expected

2013-11-29 Thread Robin Lery
Yes. On Fri, Nov 29, 2013 at 9:55 PM, Robin Lery wrote: > Do i put the codes to all the app's - models.py? > > > On Fri, Nov 29, 2013 at 9:44 PM, Tom Evans wrote: > >> On Fri, Nov 29, 2013 at 4:06 PM, Aamu Padi wrote: >> >

Re: Signals not working as expected

2013-11-29 Thread Robin Lery
Do i put the codes to all the app's - models.py? On Fri, Nov 29, 2013 at 9:44 PM, Tom Evans wrote: > On Fri, Nov 29, 2013 at 4:06 PM, Aamu Padi wrote: > > Thank you for the answer. I am a newbie, would be very grateful if you > could > > please

Re: Signals not working as expected

2013-11-29 Thread Tom Evans
On Fri, Nov 29, 2013 at 4:06 PM, Aamu Padi wrote: > Thank you for the answer. I am a newbie, would be very grateful if you could > please show me how to do that? Put the code in signals.py at the bottom of models.py and delete signals.py Cheers Tom -- You received this

Re: Signals not working as expected

2013-11-29 Thread Aamu Padi
Thank you for the answer. I am a newbie, would be very grateful if you could please show me how to do that? On Fri, Nov 29, 2013 at 9:28 PM, Jérôme Thiard <jerome.thi...@gmail.com>wrote: > From Django documentation > https://docs.djangoproject.com/en/1.6/topics/signals/#connect

Re: Signals not working as expected

2013-11-29 Thread Jérôme Thiard
>From Django documentation https://docs.djangoproject.com/en/1.6/topics/signals/#connecting-receiver-functions You can put signal handling and registration code anywhere you like. > However, you’ll need to make sure that the module it’s in gets imported > early on so that the signal hand

Signals not working as expected

2013-11-28 Thread Aamu Padi
time.now) > > And this is the signals.py: > > from django.db.models import signals > from django.contrib.contenttypes.models import ContentType > from django.dispatch import dispatcher > from blogs.models import Blog > from picture.models import Photo >

Re: Django signals to all connections?

2013-08-20 Thread Jani Tiainen
date the text on his page to that text (live) > > > Op maandag 19 augustus 2013 06:29:45 UTC+2 schreef Gerd Koetje: > > > > Is is possible to start an event at all connected users with signals? > > If this is possible can someone show me an example of it. > > > >

Re: Django signals to all connections?

2013-08-19 Thread Gerd Koetje
augustus 2013 06:29:45 UTC+2 schreef Gerd Koetje: > > Is is possible to start an event at all connected users with signals? > If this is possible can someone show me an example of it. > > > Greetz > Gerd > > -- You received this message because you are subscribed to the G

Re: Django signals to all connections?

2013-08-19 Thread Rafael Garbin
Yes, always one user logged in, django will look for receiver and running the method. 2013/8/19 Gerd Koetje > omg god bless python/django.. > > > So this really works? > > user 1 is logged in to my app > user 2 is logged in to my app > > As admin i send a signal

Re: Django signals to all connections?

2013-08-19 Thread Gerd Koetje
omg god bless python/django.. So this really works? user 1 is logged in to my app user 2 is logged in to my app As admin i send a signal with the text hello all and it will be printed on the page that user 1 and 2 are on? -- You received this message because you are subscribed to the Google

Re: Django signals to all connections?

2013-08-19 Thread Rafael Garbin
from django.contrib.auth import user_logged_in @receiver(user_logged_in) def my_func(...) -- 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

Re: Django signals to all connections?

2013-08-19 Thread Avraham Serour
maybe you can use a middleware to log access On Mon, Aug 19, 2013 at 7:29 AM, Gerd Koetje <deonlinefotogr...@gmail.com>wrote: > Is is possible to start an event at all connected users with signals? > If this is possible can someone show me an example of it. > > > Greetz

Django signals to all connections?

2013-08-18 Thread Gerd Koetje
Is is possible to start an event at all connected users with signals? If this is possible can someone show me an example of it. Greetz Gerd -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: signals documentation question

2012-10-30 Thread Mike Dewhirst
Russell I haven't gotten around to using signals just yet so it will be a while before I can suck it and see. I was just reading up because they look like a solution to a particular design problem I have. I've gone back to the specs for the moment. Thanks for the fast response. Cheers

Re: signals documentation question

2012-10-29 Thread Russell Keith-Magee
mported > early on so that the signal handling gets registered before any signals > need to be sent. This makes your app's models.py a good place to put > registration of signal handlers. > > ... and my question: > > When models live in a models directory instead of models.py, sho

signals documentation question

2012-10-29 Thread Mike Dewhirst
The 1.5 docs say ... Where should this code live? You can put signal handling and registration code anywhere you like. However, you'll need to make sure that the module it's in gets imported early on so that the signal handling gets registered before any signals need to be sent. This makes

ordering of post_syncdb signals?

2012-08-09 Thread carrier24sg
Hi folks, I am a little confused with the ordering of the post_syncdb signal? (using 1.2.4) Looking at the code in auth and contenttype, what makes auth.permission so sure that the appropriate content type was created before the necessary permission is created? Similarly, I have another app

Re: signals

2012-03-10 Thread Shawn Milochik
You can do exactly that by specifying a sender: https://docs.djangoproject.com/en/1.3/topics/signals/#connecting-to-signals-sent-by-specific-senders Also, note that the sender is available in the receiver because it's always the first argument sent by the signal, so you can have a function

signals

2012-03-10 Thread rafiee.nima
I want to listen to pre ( or post ) save signal from a special model in my models but the problem is in listen function I can not mention a specific model . it gets signal from all models but I want to just use signal from a specific models I would tnx for any idea -- You received this message

Know all signals available within a project

2012-03-10 Thread Marc Aymerich
Hi!, Any idea about how can I get a list of all available signals? -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group,

Re: Signals and listeners defined in a separate modules unusable in other apps

2011-10-09 Thread Andy McKay
On 2011-10-08, at 6:59 AM, Guruprasad L wrote: > When the signals.py and listeners.py are in the same app in which the view > function triggers the signal, things are working fine. What could be the > issue here and how to work around it? Most likely your signals and listeners are

Re: Question about Signals and Bootstrap

2011-10-09 Thread Andy McKay
On 2011-10-08, at 7:36 AM, Santiago Basulto wrote: > Where can i find some doc that explains how Django is bootstraped and > loaded. I'm looking for this becouse while i was reading the "Signals" > chapter at django docs, i read that "In some circumstances, t

Question about Signals and Bootstrap

2011-10-08 Thread Santiago Basulto
Hello people. I'm starting with django. Where can i find some doc that explains how Django is bootstraped and loaded. I'm looking for this becouse while i was reading the "Signals" chapter at django docs, i read that "In some circumstances, the module in which you are connect

Signals and listeners defined in a separate modules unusable in other apps

2011-10-08 Thread Guruprasad L
Hi, I have a django project where I have defined some signals and listeners in a separate module (i.e., in a folder with __init__.py) in the files signals.py and listeners.py. These signals are to be used by multiple applications in the project. So I wrote the code connecting the signal

Re: Question about Signals : How to get the Primary Key Value ?

2011-10-06 Thread bino oetomo
On 10/06/2011 05:11 PM, Daniel Roseman wrote: The instance is in, well, the `instance` argument. You get it from there. -- DR. Thankyou ... I got it by ---> print obj.pk Sincerely -bino- -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Question about Signals : How to get the Primary Key Value ?

2011-10-06 Thread Daniel Roseman
On Thursday, 6 October 2011 10:10:09 UTC+1, bino wrote: > > Dear All .. > > From the basic tutorial of "Polls", > I add this lines to model.py > START > from django.db.models.signals import post_save > > def do_something(sender, **kwargs): > print "==START===" >

Re: Question about Signals : How to get the Primary Key Value ?

2011-10-06 Thread BILLION Sébastien
hi, obj.id ? BILLION Sébastien the Answer to the ultimate question of life, the universe and everything is 42 http://www.sebastienbillion.com/ Le 06/10/2011 11:10, bino oetomo a écrit : Dear All .. From the basic tutorial of "Polls", I add this lines to

  1   2   3   >