-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
30 lines (20 loc) · 695 Bytes
/
Copy pathconfig.py
File metadata and controls
30 lines (20 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get("SECRET_KEY") or "your-secret-key"
SQLALCHEMY_DATABASE_URI = "sqlite:///" + os.path.join(basedir, "app.db")
SQLALCHEMY_TRACK_MODIFICATIONS = False
@staticmethod
def init_app(app):
pass
class DevelopmentConfig(Config):
DEBUG = True
class ProductionConfig(Config):
DEBUG = False
# Update the database URI for your PostgreSQL database
SQLALCHEMY_DATABASE_URI = "postgresql://username:password@localhost/db_name"
config = {
"development": DevelopmentConfig,
"production": ProductionConfig,
# Add more configurations as needed
}