I put
print 'Hello world!'
into __init__.py
in my django project. When I run ./manage.py runserver
now, I get
gruszczy@gruszczy-laptop:~/Programy/project$ ./manage.py runserver
Hello world!
Hello world!
Validating models...
0 errors found
Why is __init__.py
run twice? It should be loaded only once.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…