-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
23 lines (16 loc) · 868 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# used to set config / environment vars for web-contact-kidslinkedConverter
# Collin Sparks, cklsparks@gmail.com, https://github.com/spark-c/web-contact-converter
import os
class Config():
DEBUG = False
# SESSION_COOKIE_SECURE=True, # free Heroku apps are not HTTPS and session cookie cannot be set as secure
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
SECRET_KEY = 'kidslinked'
SQLALCHEMY_TRACK_MODIFICATIONS = False
class DevelopmentConfig(Config):
SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://postgres:admin@localhost:5432/web-contact-converter-dev'
DEBUG = True
class ProductionConfig(Config):
if os.environ.get('DATABASE_URL'):
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL').replace('postgres', 'postgresql') # Heroku uses 'postgres' prefix, but SQLAlchemy requires 'postgresql'