Skip to content

Instantly share code, notes, and snippets.

@bay007
Last active June 29, 2019 19:29
Show Gist options
  • Save bay007/54b9ba2872af31afd857734e7e477e33 to your computer and use it in GitHub Desktop.
Save bay007/54b9ba2872af31afd857734e7e477e33 to your computer and use it in GitHub Desktop.
Create Django with postgres user without full access.
GRANT CONNECT ON DATABASE database_name TO username;
GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA database_name TO username;
ALTER ROLE "username" WITH LOGIN;
ALTER USER username WITH NOSUPERUSER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment