#7 Basic flask app. Setup routes, DB, and made a user model. Made initial migrations

This commit is contained in:
2023-03-16 19:39:58 -04:00
parent dcc172f17a
commit 73bdc75095
14 changed files with 359 additions and 0 deletions

14
backend/config.py Normal file
View 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"]