title: Django and Python + uWSGI
body: <p>Using <a href="http://library.linode.com/lemp-guides/debian-5-lenny/#deploy_python_code_with_wsgi_and_uwsgi" rel="noreferrer">instruction</a> I try to connect <strong>Python</strong> + <strong>uWSGI</strong>.</p>
  
  <p>I made default project in a folder <strong>/home/sanya/django/pasteurl</strong>.
  However, have opened it in a browser I get</p>
  
  <pre><code>uWSGI Error
  wsgi application not found
  </code></pre>
  
  <p>Logs contain the following:</p>
  
  <pre><code>binding on TCP port: 9001
  your server socket listen backlog is limited to 64 connections
  added /home/sanya/django/pasteurl to pythonpath.
  initializing hooks...done.
  ...getting the applications list from the 'django' module...
  uwsgi.applications dictionary is not defined, trying with the "applications" one...
  applications dictionary is not defined, trying with the "application" callable.
  static applications not defined, you have to use the dynamic one...
  spawned uWSGI master process (pid: 7637)
  spawned uWSGI worker 1 (pid: 7646)
  spawned uWSGI worker 2 (pid: 7647)
  spawned uWSGI worker 3 (pid: 7648)
  spawned uWSGI worker 4 (pid: 7649)
  </code></pre>
  
  <p>File <strong>/home/sanya/django/pasteurl/django.wsgi</strong></p>
  
  <pre><code>import os
  import django.core.handlers.wsgi
  
  # init django settings
  os.environ['DJANGO_SETTINGS_MODULE'] = 'pasteurl.settings'
  
  # define wsgi app
  application = django.core.handlers.wsgi.WSGIHandler()
  
  # mount this application at the webroot
  # applications = { '/': 'application' }
  </code></pre>
  
  <p>As I realised, it's something wrong with this <strong>application</strong> dictionary</p>