Issue connecting to Postgres Database in Django Project with Psycopg2

So sorry. It seems very likely that I am doing something stupid.

I am deploying a basic Django app and am essentially following the tutorial . I selected creating and attaching a development database and went to deploy and no matter how I fiddle, I get the following error.

 psycopg2.OperationalError: could not translate host name "<APP-NAME>-db.flycast" to address: No address associated with hostname
  The above exception was the direct cause of the following exception:

edit. I should mention that I am reading the DATABASE_URL with django-environ…

DATABASES = {
    'default': env.db('DATABASE_URL')
}

I can connect to the db with flyctl and am totally out of ideas how what to do.