Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

connect postgresql using a connection string

# Parse database configuration from $DATABASE_URL
import dj_database_url
# DATABASES['default'] =  dj_database_url.config()
#updated
DATABASES = {'default': dj_database_url.config(default='postgres://user:pass@localhost/dbname')}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #connect #postgresql #connection #string
ADD COMMENT
Topic
Name
2+5 =