-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
24 lines (19 loc) · 833 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
23
24
import os
from dotenv import load_dotenv
from dynaconf import settings
from db import DatabaseSettings
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config:
""" Class that defines the application settings."""
SECRET_KEY = settings.get('SECRET_KEY')
SQLALCHEMY_DATABASE_URI = DatabaseSettings.get_db()
SQLALCHEMY_TRACK_MODIFICATIONS = False
MAIL_SERVER = settings.get('MAIL_SERVER')
USERS_MEDIA_ROOT = os.path.join(basedir, 'uploads/users_images')
KINDNESS_MEDIA_ROOT = os.path.join(basedir, 'uploads/posts_images')
MAIL_PORT = settings.get('MAIL_PORT')
MAIL_USE_TLS = settings.get('MAIL_USE_TLS')
MAIL_USERNAME = settings.get('MAIL_USERNAME')
MAIL_PASSWORD = settings.get('MAIL_PASSWORD')
ADMINS = ['[email protected]']