﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28774	Use only a specific database schema instead of 'public' one (like in Postgresql)	Riccardo Campisano	nobody	"Hello,

In our project (https://github.com/desihub/qlf) we should use a PostgreSQL database used by others application, so that we want to configure Django ORM to use just a specific schema.

I cannot find such kind of configurations in the official documentation. A tip for a kind of such configuration is available in 

  https://www.amvtek.com/blog/posts/2014/Jun/13/accessing-multiple-postgres-schemas-from-django/

and it appears to work, using a specific config like that

{{{
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'OPTIONS': {
            'options': '-c search_path=qlf_schema'
        },
    },
}}}

However, I would be sure that this is the correct (official, supported) way to do such thing, and that will be supported in the future (and that this is not a workaround that currently work but can break in a next version of Django).

Thanks,
Riccardo"	Uncategorized	closed	Database layer (models, ORM)	1.8	Normal	duplicate	django, orm, database, postgresql, schema	riccardo.campisano@… ogando@…	Unreviewed	0	0	0	0	0	0
