title: Specify PostgreSQL Schema in Django
body: <p>I am trying to build some DB front-ends using Django since I like the general MVC structure as well as their template system and admin interface. However, I am having trouble with certain aspects of using a PostgreSQL back-end.  </p>
  
  <p>I've managed to figure out how to specify different schemas (and databases) using the database section of the <code>settings.py</code> file like so:</p>
  
  <pre><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.sqlite3',
          'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
      },
      'MPS': {
          'ENGINE': 'django.db.backends.postgresql_psycopg2',
          'OPTIONS': {
              'options': '-c search_path=django'
          },
         'NAME': 'sandbox_manzer',
         'HOST': '192.168.2.151',
         'PORT': '5434',
         'USER': '******',
         'PASSWORD': '**********************',
      }
  }
  </code></pre>
  
  <p>However, when I try and script some basic tests, as detailed <a href="https://docs.djangoproject.com/en/1.10/intro/tutorial05/" rel="noreferrer">here</a>, I run into a problem.  My user can create databases just fine so my test_db gets built, but when the django app goes to build the models into tables I get an error stating that <code>No schema is specified</code> for the test_db.  Any help in how I specify schema names for the test_db would be most appreciated.  Especially since I intend to build out multiple apps for a single project using different schemas as logical separators.</p>
  
  <p>Thanks!</p>