Opened 18 years ago
Closed 18 years ago
#2753 closed defect (duplicate)
Signals are picky about how senders are imported
Reported by: | Joeboy | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | dev |
Severity: | normal | Keywords: | signal, signals, sender, senders, dispatcher |
Cc: | django25@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This works as expected:
from myproject.myapp import models as myapp_app dispatcher.connect( myfunction, signal=signals.post_syncdb, sender=myapp_app)
This fails silently and mysteriously:
from myapp import models as myapp_app dispatcher.connect( myfunction, signal=signals.post_syncdb, sender=myapp_app)
Thus decoupling is broken, and it takes the uninitiated user (ie. me) ages to work out what the problem is.
Change History (3)
comment:1 by , 18 years ago
comment:3 by , 18 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This is a dupe of #3951 and the discussion over there explains the solution we'll implement.
Note:
See TracTickets
for help on using tickets.
@Joe: Where did you put the above code?