Skip to content

Commit 7faceca

Browse files
authored
Handle heroku legacy-style postgres URIs
1 parent ff15887 commit 7faceca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
app.config['APP_CLIENT_ID'] = os.getenv('APP_CLIENT_ID')
2121
app.config['APP_CLIENT_SECRET'] = os.getenv('APP_CLIENT_SECRET')
2222
app.config['SESSION_SECRET'] = os.getenv('SESSION_SECRET', os.urandom(64))
23-
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', 'sqlite:///data/hello_world.sqlite')
23+
app.config['SQLALCHEMY_DATABASE_URI'] = os.getenv('DATABASE_URL', 'sqlite:///data/hello_world.sqlite').replace("postgres://", "postgresql://", 1)
2424
app.config['SQLALCHEMY_ECHO'] = app.config['DEBUG']
2525

2626
# Setup secure cookie secret

0 commit comments

Comments
 (0)