[Starting a new thread might have been helpful here. You seem to have
replied to an old thread from January, but not at all related to that
thread (except that the word "signals" is mentioned).]


On Tue, 2009-02-10 at 09:02 +0000, Ben Eliott wrote:
> Can anyone please suggest why a signal might be failing to connect.  
> I'm using 1.0.2 on apache + mod_wsgi. The signal gets picked up fine  
> using the localserver, but fails on the server proper.
> 
> When i go into the shell and get the signal object and check  
> 'receivers' i can see the listener registered. But it just doesn't  
> seem to want to fire when the event occurs.
> 
> The signal is in one app's models.py, when i put a listener in that  
> same file it picks it up fine. When i move the listener to a different  
> app's models.py this is when it fails.
> Something to do with an import conflict? The second app's models.py  
> file already imports a class from the signal's models.py file.  Any  
> suggestions very welcome, thanks!

Are you sure the place where the signal is being registered has actually
been imported? The development server imports all applications (and
their model files) fairly early on, from memory, but this isn't
necessarily going to be true. We tend to delay importing things until we
need them.

So, unless you're explicitly importing the file containing the
register() call, it might well not be being called.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
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, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to