-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
29 lines (21 loc) · 756 Bytes
/
config.py
File metadata and controls
29 lines (21 loc) · 756 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
from os import environ, path
from dotenv import load_dotenv
basedir = path.abspath(path.dirname(__file__))
load_dotenv(path.join(basedir, '.env'))
class Config:
""" Set Parent Class config variables """
SECRET_KEY = environ['SECRET_KEY'] or "very_secret_key_1234567"
STATIC_FOLDER = 'static'
TEMPLATES_FOLDER = 'templates'
SQLALCHEMY_TRACK_MODIFICATIONS = False
SQLALCHEMY_DATABASE_URI = environ['DATABASE_URL']
class DevelopmentConfig(Config):
FLASK_ENV = 'development'
DEBUG = False
TESTING = True
# SQLALCHEMY_DATABASE_URI = 'sqlite:///dev.sqlite3'
class ProductionConfig(Config):
FLASK_ENV = 'production'
DEBUG = False
TESTING = False
# SQLALCHEMY_DATABASE_URI = 'sqlite:///prod.sqlite3'