Re: Register signal on all objects

2010-01-10 Thread Matias
El 10/01/10 04:18, Ishwor Gurung escribió: 2010/1/10 Matias: [...] Thanks, this will do the trick... Curious. Why doesn't overriding save(..) do for you? Because I would have to override the save() method on all Model classes -- You received this message because you are subscribed to the

Re: Register signal on all objects

2010-01-09 Thread Ishwor Gurung
2010/1/10 Matias : [...] > Thanks, this will do the trick... Curious. Why doesn't overriding save(..) do for you? -- Regards Ishwor Gurung Key id:0xa98db35e Key fingerprint:FBEF 0D69 6DE1 C72B A5A8 35FE 5A9B F3BB 4E5E 17B5 -- You received this message because you are subscribed to the Google G

Re: Register signal on all objects

2010-01-09 Thread Matias
El 09/01/10 17:12, Andy McKay escribió: On 10-01-08 7:02 AM, Matias wrote: Is there any recommended way to attach a post_save signal to ALL models? When you create a signal you can optionally assign a model to listen too. Not doing that means it is called for all models. http://docs.djangopro

Re: Register signal on all objects

2010-01-09 Thread Andy McKay
On 10-01-08 7:02 AM, Matias wrote: Is there any recommended way to attach a post_save signal to ALL models? When you create a signal you can optionally assign a model to listen too. Not doing that means it is called for all models. http://docs.djangoproject.com/en/dev/topics/signals/#connect

Re: Register signal on all objects

2010-01-08 Thread Ronghui Yu
How about creating a meta class for all your models in the project Matias ??: Is there any recommended way to attach a post_save signal to ALL models? The best way I'm thinking of is maybe by using the ContentType class to get a list of all models and iterate over them registering the signal,

Register signal on all objects

2010-01-08 Thread Matias
Is there any recommended way to attach a post_save signal to ALL models? The best way I'm thinking of is maybe by using the ContentType class to get a list of all models and iterate over them registering the signal, but I'm not sure if this is the best way to do it... Any comment appreciated.