title: able to check db connection host or name (not db name but the setting) ? django
body: <p>I am not trying to check the db name to the connection, I have multiple database setup in django and also used the <code>database route</code> to create a <code>failover</code> but I am wondering if I can get the name of the connection host or the name given to the settings...</p>
  
  <p>for example</p>
  
  <pre><code>DATABASES = {
      'default': {  # trying to get this name 'default'
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'db_name',
          'USER': 'euser',
          'PASSWORD': 'password',
          'HOST': 'host', # trying to get this host name 'host'
          'PORT': 3306,
      },
      'node2': {  # trying to get this name 'node2'
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'db_name',
          'USER': 'euser',
          'PASSWORD': 'password',
          'HOST': 'host2',  # trying to get this host name 'host2'
          'PORT': 3306,
      },
  }
  </code></pre>
  
  <p>Is it possible to get those names I commented out above?
  For my failover, I am trying to send an email if another db is being used, but it would be great if I can get especially the <code>host</code> so it would be easier on me</p>
  
  <p>P.S. off topic, is it possible to change the name <code>default</code> to other names? I tried changing it and I would get errors.  Seems like I must have at least one database setting name called <code>default</code></p>
  
  <p>Thanks in advance for any help.</p>