title: django uwsgi error python application not found after set databases?
body: <p>I found in my project, django will give me this words"uwsgi error python application not found".</p>
  
  <p>django project file tree</p>
  
  <ul>
  <li>/home</li>
  <li>-/home/imagepro</li>
  <li>-/home/imagepro/env #virtualenv</li>
  <li>-/home/imagepro/picpro #django project</li>
  <li>-/home/imagepro/picpro/picapp #django application</li>
  <li>-/home/imagepro/picpro/picpro</li>
  </ul>
  
  <p>my uwsgi setting, file named pic.ini</p>
  
  <pre><code>[uwsgi]
  vhost = true
  plugins = python
  socket = /tmp/pic.sock
  master = true
  enable-threads = true
  processes = 4
  wsgi-file = /home/imagepro/picpro/picpro/wsgi.py
  virtualenv = /home/imagepro/env
  chdir = /home/imagepro/picpro
  touch-reload = /home/imagepro/picpro/reload
  </code></pre>
  
  <p>my nginx setting,file named pic</p>
  
  <pre><code>server {
      listen  80;
      server_name www.mydomain.com;
      root /home/imagepro;
      access_log /var/log/nginx/imagepro.access.log;
      error_log /var/log/nginx/imagepro.error.log;
      location / {
          uwsgi_pass  unix:///tmp/pic.sock;
          include     uwsgi_params;
      }
  }
  </code></pre>
  
  <p>piece of django setings.py</p>
  
  <pre><code>DEBUG = True
  
  ALLOWED_HOSTS = ['*']
  ......#here DATABASE setting
  DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'dbname',
          'USER': 'username',
          'PASSWORD': 'pass',
          'HOST': 'localhost',
          'PORT': '3306',
      }
  }
  </code></pre>
  
  <p>Here DATABASES setting, when note it, visit 'www.mydomain.com', It shows 'It works!' ,but if I add the DATABASES into settings.py . visit 'www.mydomain.com', It shows 'uwsgi error python application not found'</p>
  
  <p>It's very strange,how could I fix it?</p>