title: Specify database to use in Django
body: <p>I need to use multiple databases for my django project. The application works fine when there is only one database:</p>
  <p>In setting.py</p>
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'mydb',                     
          'USER': 'root',
          'PASSWORD': '',
          'HOST': '127.0.0.1',                     
          'PORT': 3306,    
      },
  </code></pre>
  <p>But if I added more databases from the same engine:</p>
  <pre><code>DATABASES = {
      'default':{},
      'mydb1': {
              'ENGINE': 'django.db.backends.mysql', 
              'NAME': 'mydb1',    
              'USER': 'root',
              'PASSWORD': '',
              'HOST': '127.0.0.1',                    
              'PORT': 3306,                  
          },
     'mydb2': {
              'ENGINE': 'django.db.backends.mysql', 
              'NAME': 'mydb2',           
              'USER': 'root',
              'PASSWORD': '',
              'HOST': '127.0.0.1',             
              'PORT': 3306,                   
                  }
      }
  </code></pre>
  <p>it gives me following error:</p>
  <pre><code>ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. Check settings documentation for more details.
  </code></pre>
  <p>Also, i tried:</p>
  <pre><code>DATABASES = {
          'default': {
                  'ENGINE': 'django.db.backends.mysql', 
                  'NAME': 'mydb1',    
                  'USER': 'root',
                  'PASSWORD': '',
                  'HOST': '127.0.0.1',                    
                  'PORT': 3306,                  
              },
         'mydb2': {
                  'ENGINE': 'django.db.backends.mysql', 
                  'NAME': 'mydb2',           
                  'USER': 'root',
                  'PASSWORD': '',
                  'HOST': '127.0.0.1',             
                  'PORT': 3306,                   
                      }
          }
  </code></pre>
  <p>It only sees mydb1, not mydb2, when i tried query mydb2, it gives me:</p>
  <pre><code>DoesNotExist: Site matching query does not exist.
  </code></pre>
  <p>Do I need to define database route? it seems that I only need to do that for customized read/write.</p>
  <p>Thanks</p>
  <h1>UPDATE:</h1>
  <p>In django docs, it says &quot;The default routing scheme ensures that if a database isn't specified, all queries fall back to the default database&quot;.</p>
  <p>So I guess my actual question is  <strong>how do I specify a database to use for my queries?</strong></p>