#7 Basic flask app. Setup routes, DB, and made a user model. Made initial migrations
This commit is contained in:
14
backend/config.py
Normal file
14
backend/config.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||
load_dotenv(os.path.join(basedir, ".env"))
|
||||
|
||||
|
||||
class Config(object):
|
||||
SECRET_KEY = os.environ.get("SECRET_KEY") or "you-will-never-guess"
|
||||
SQLALCHEMY_DATABASE_URI = os.environ.get("DATABASE_URL", "").replace(
|
||||
"postgres://", "postgresql://"
|
||||
) or "sqlite:///" + os.path.join(basedir, "app.db")
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = True
|
||||
ADMINS = ["your-email@example.com"]
|
||||
Reference in New Issue
Block a user