This commit is contained in:
Yisroel Baum 2024-09-04 20:22:49 +03:00
commit c97e3e8d4e
21 changed files with 231 additions and 0 deletions

20
app/config.py Normal file
View file

@ -0,0 +1,20 @@
import os
import json
# with open('/etc/config.json') as config_file:
# config = json.load(config_file)
config = {
'SQLALCHEMY_DATABASE_URI_SQLITE': 'sqlite:///site.db'
}
class Config():
SQLALCHEMY_DATABASE_URI = config.get('SQLALCHEMY_DATABASE_URI_SQLITE')
SECRET_KEY = config.get('SECRET_KEY')
MAIL_PORT = 587
MAIL_USE_TLS = True
MAX_CONTENT_LENGTH = 500 * 1000 * 1000
CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_IMPORTS = ('app.celery_tasks', )
SMTP_USER = config.get('SMTP_USER')
SMTP_PASSWORD = config.get('SMTP_PASSWORD')