📜  django postgres 用户权限 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:40.873000             🧑  作者: Mango

代码示例1
CREATE DATABASE myproj_db WITH OWNER myproj_user TEMPLATE=template1 ENCODING='utf-8';
CREATE USER myproj_user WITH PASSWORD '123' SUPERUSER CREATEDB CREATEROLE LOGIN;

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'myproj_db',
        'USER': 'myproj_user',
        'PASSWORD': '123',
        'HOST': '',
        'PORT': '',
    },
}