Oh __import__ with [''] as the fouth parameter, I had the following message in
draft for the "post_save signal triggered twice" [1]thread a couple of week ago
and never dare to send it (I've update the grepping over the tree to current
trunk status):
Regarding the use of __import__, there are some notes in [2]ticket 6579 about
calling it with a empty string as the fourth parameter having the effect of
initializing the module twice (there is also a [3]link to a ticket in the
Python bug tracker.)
When [4]pointed to it in a comment to #6587, Øyvind Saltvik
implemented another loading strategy in the latest patch for that ticket.
All this in the context of (the maybe 1.0 feature) of removing the hacks in the
template tag loading code, but could this also be related to the repeated
triggering of signals?
Searching over the Django code as of r8255 [5]finds 28 occurrences of such a
pattern, some of them when loading user project or application code from the
Django core.
Regards,
--
Ramiro Morales
1. http://groups.google.com/group/django-developers/browse_frm/thread/c1cf43fddb2c8cdd/8131a56097b61fc8?hl=en&lnk=gst8131a56097b61fc8
2. http://code.djangoproject.com/ticket/6579
3. http://code.djangoproject.com/ticket/6579#comment:6
4. http://code.djangoproject.com/ticket/6587#comment:10
5. http://dpaste.com/hold/70347/