I do some init stuff when a module is first loaded. The problem is that somehow it is imported twice, and I can't figure out why. I thought it might be imported using different path, as in this example:
a.py:
from apps.blog import models
...
b.py:
from blog import models
...
I insert print __name__
in my module, and it printed out blog.models
twice, so it turnes out that the problem is not within import paths.
So, is there any other reason for a module to be imported multiple times?
UPDATE: I didn't mention that I'm using django. I think this problem related to django's manage.py script: https://docs.djangoproject.com/en/dev/releases/1.4/#updated-default-project-layout-and-manage-py