title: Use database depending on subdomain
body: <p>Is it OK to set the database name setting depending on subdomain for each request?</p>
  
  <p>Something like this in a middleware:</p>
  
  <pre><code>from django.db import connection
  
  company_name = ... # read the subdomain
  connection.settings_dict['NAME'] = 'db_' + company_name
  </code></pre>