Snowflake-Labs / django-snowflake

MIT License
59 stars 15 forks source link

Allow passing snowflake.connector.connect() params in DATABASES 'OPTIONS' #38

Closed timgraham closed 2 years ago

taylor-cedar commented 2 years ago

Thanks @timgraham. This looks good. I will try it out this week.

taylor-cedar commented 2 years ago

Hey @timgraham. I tried this out. It seems to error with this

File "/Users/thakes/code/test_django/env/lib/python3.9/site-packages/django/db/backends/base/base.py", line 199, in connect
    conn_params = self.get_connection_params()
  File "/Users/thakes/code/test_django/django_snowflake/base.py", line 110, in get_connection_params
    raise ImproperlyConfigured(self.settings_is_missing % 'PASSWORD')
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is missing 'PASSWORD' for 'django_snowflake'.

When I commented out that error, it seemed to work.

timgraham commented 2 years ago

I added a commit to make PASSWORD optional if an authenticator is specified.