Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick note how to make it work with dj-database-url #10

Open
kojiromike opened this issue Dec 15, 2020 · 0 comments
Open

Quick note how to make it work with dj-database-url #10

kojiromike opened this issue Dec 15, 2020 · 0 comments

Comments

@kojiromike
Copy link

Not really an issue, but someone may find this useful. If you want to use this with dj-database-url, add a scheme entry:

# settings.py
from decouple import config
import dj_database_url


dj_database_url.SCHEMES["postgres+iam"] = "django_iam_dbauth.aws.postgresql"
DATABASES['default'] = dj_database_url.config(conn_max_age=600)

and make sure your DATABASE_URL has the scheme postgres+iam and the query string use_iam_auth=true, something like postgres+iam://iam_user@rds_endpoint/dbname?use_iam_auth=true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant