Closed r3r00t3d closed 6 years ago
hi @r3r00t3d by default it reads from DATABASE_URL
if you would like to read from another variable just import os.environ and parse it directly:
import os, dj_database_url
DATABASES['default'] = dj_database_url.parse(os.environ['SOME_OTHER_VARIABLE'], conn_max_age=600)
Thank you. I appreciate the answer.
Hi,
just wanted to ask what is the easiest way to interact with multiple databases via env variables? I would like to use DATABASE_URL but I cannot see an easy way to do this.
Thanks.