On Jan 19, 8:44 pm, Emil Stenström <[email protected]> wrote:
> On Thursday, 22 December 2011 03:49:44 UTC+1, Russell Keith-Magee wrote:
> > ... there isn't a single solution that will work
> > everywhere, which one of the reasons that the docs are silent on the
> > issue.
>
> Just for the record: The docs are actually telling you to put your signals
> in models.py, at the end 
> of:https://docs.djangoproject.com/en/dev/topics/signals/#s-receiver-func...
>
> I would much rather have them point people to signals.py, and an import
> signals.py in __init__.py. I've seen beginners be trapped in the circular
> import loop when trying to move their signals to a separate file, not
> realizing that they also need to move the import of signals.py away from
> models to be able to use Model classes inside signals.

The problem with importing them from __init__.py is that it breaks
coverage as the signals and the models get imported before the
coverage tools are loaded when using things nose, django nose and nose
coverage.


Kirit

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to