From 5f167085c60a3db9d64f464b43cdd0f054f50895 Mon Sep 17 00:00:00 2001 From: Dylan Huynh Date: Sun, 17 Sep 2023 14:57:02 +1000 Subject: [PATCH] Updating registration functionality --- config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config.py b/config.py index dfe0b05..ecb9bab 100644 --- a/config.py +++ b/config.py @@ -14,7 +14,9 @@ class Config(object): FORCE_HTTPS = True SQLALCHEMY_TRACK_MODIFICATIONS = False LOGIN_DISABLED = False # Enable this to avoid having to login - SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') + SQLALCHEMY_DATABASE_URI = os.getenv("DATABASE_URL") # or other relevant config var + if SQLALCHEMY_DATABASE_URI.startswith("postgres://"): + SQLALCHEMY_DATABASE_URI = SQLALCHEMY_DATABASE_URI.replace("postgres://", "postgresql://", 1) SESSION_COOKIE_SECURE = True MAIL_SERVER = os.environ.get('MAIL_SERVER')