project2501 schrieb: > Hi, > I'm new to django and have a couple questions. > > I have a __init__.py in my app and try to declare a simple module wide > variable. I noticed __init__.py is called twice when I run "python > manage.py runserver". Is this normal? > I remember, that I had a problem like this, too: http://www.mail-archive.com/django-users@googlegroups.com/msg39059.html
You can do this to debug it: # file which gets imported twice import logging logging.error('import %s %s' % (__file__, __name__)) To investigate who called this peace of code you can use the traceback module and print the stacktrace. Be sure that you access the module only in one way: e.g. always "myapp.modules". Not sometimes "myproj.myapp.modules". HTH Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---