title: Django multiple DB how to write router
body: <p>I've got two DB, I've written a <strong>router.py</strong> that correctly manage write and read, but if the <em>read db the <strong>default</em></strong> is down I cannot access also the write db getting the </p>
  
  <pre><code>class TestRouter(object):
  
      def db_for_read(self, model, **hints):
  
          if model._meta.app_label == 'read_app':
              return 'default'
          if model._meta.app_label == 'write_app':
              return 'write_db'        
          return None
  
      def db_for_write(self, model, **hints):
  
          if model._meta.app_label == 'write_app':
              return 'write_db'
          return None
  </code></pre>
  
  <p>and in <strong>settings.py</strong>:</p>
  
  <pre><code>DATABASE_ROUTERS = ['prj.dbrouter.TestRouter', ]
  </code></pre>
  
  <p>this is the error:</p>
  
  <blockquote>
    <p>cnn = _connect(dsn, connection_factory=connection_factory,
    async=async)<br>
    OperationalError: could not connect to server: Connection
    refused   Is the server running on host "192.168.2.1" and accepting
      TCP/IP connections on port 5432?</p>
  </blockquote>
  
  <p>is there a way to say to django to ignore failure in connection to <em>default</em> db?</p>