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')