title: Django: adding a random.py file in project dir destroyed the setting's import in WSGI
body: <p>This seems weird but it has happened a number of times now. I have some artitrary .py file which was just added to the "Project/Project" directory (same directory as my settings.py). 2-3 scripts import from this script. </p>
  
  <p>After adding the script and restarting apache, the django website shows the following errors exclusively:</p>
  
  <p>Error from:</p>
  
  <pre><code>raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % 
       (self.SETTINGS_MODULE, e))
   [Wed Jul 24 08:10:03 2013] [error] [client 127.0.0.1] ImportError: 
  Could not import settings 'Project.settings' (Is it on sys.path?): 
  No module named settings
  </code></pre>
  
  <p>Any advice? Thank you.</p>
  
  <p>Here is a directory repr:</p>
  
  <pre><code>Project/
      Project/
          __init__.py
          settings.py
          urls.py
          views.py
          wsgi.py
          something.py
      App/
          __init__.py
          views.py
          models.py
          tasks.py
  </code></pre>
  
  <p>I tried to restore the site by removing something.py and its imports, however nothing worked.</p>
  
  <p>UPDATE: in the wsgi.py file I put</p>
  
  <pre><code>print os.getcwd() 
  # prior to
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Project.settings")
  from django.core.wsgi import get_wsgi_application
  application = get_wsgi_application()
  </code></pre>
  
  <p>And the result was off! We were in the wrong directory.
  It pointed to /home/user/path/to/django/project instead of /home/user, but however it still
  does not work!! Which makes no sense because settings.py is right there, it can blatantly import it..</p>
  
  <p>How come this random scenario caused this?? And previous times it did not.
  Can someone please explain? Thanks.</p>