We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d17e545 commit 14469b0Copy full SHA for 14469b0
src/app.py
@@ -18,8 +18,9 @@
18
app.url_map.strict_slashes = False
19
20
# database condiguration
21
-if os.getenv("DATABASE_URL") is not None:
22
- app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL')
+db_url = os.getenv("DATABASE_URL")
+if db_url is not None:
23
+ app.config['SQLALCHEMY_DATABASE_URI'] = db_url.replace("postgres://", "postgresql://")
24
else:
25
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:////tmp/test.db"
26
0 commit comments