-
-
/trunk/reviewboard/signals.py (Diff revision 1) I think I'd prefer to say this is when Review Board is "initialized" rather than "Django is loaded." These are two separate things. So perhaps just rename this to "initialized".
Define django_loaded signal so we can properly connect our own.
Review Request #968 — Created Aug. 16, 2009 and submitted
Information | |
---|---|
helder | |
Review Board SVN (deprecated) | |
Reviewers | |
reviewboard | |
Email notification wasn't getting properly connected to the publish signals because the file wasn't loaded. And connecting them in __init__.py breaks because django isn't loaded yet. With the django_loaded signal, we can delay connecting signals until we're sure all we need is there.
All tests pass.
EH
-
FYI, Python does not necessarily guarantee that a module is imported only once. This can cause signals to be registered multiple times. If you include the dispatch_uid parameter with a unique string in the connect method, that should avoid the problem. See http://code.djangoproject.com/wiki/Signals and http://code.djangoproject.com/ticket/3951.