Django:1.10
Specify the schema name in OPTIONS of DATABASES in settings.py.
settings.py
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'testdb',
'USER': 'testuser',
'PASSWORD': 'testpassword',
'HOST': 'localhost',
'PORT': '5432',
'OPTIONS': {
'options': '-c search_path=schema_name'
},
}
}
Recommended Posts