Moved from deprecated stuff to new stuff
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import logging
|
||||
from flask import Flask
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
||||
from healthcheck import HealthCheck
|
||||
from flask_cors import CORS
|
||||
from flask_mail import Mail
|
||||
|
||||
from utils import Config
|
||||
from utils import health_database_status, init_security_real_good
|
||||
@ -41,6 +41,7 @@ health = HealthCheck()
|
||||
db.init_app(app)
|
||||
init_security_real_good(app)
|
||||
CORS(app)
|
||||
Mail(app)
|
||||
|
||||
for view in [ItemView, ProfileView, UploadView, IndexView]:
|
||||
view.register(app, trailing_slash=False)
|
||||
|
@ -22,6 +22,14 @@ class Config:
|
||||
|
||||
SECURITY_PASSWORD_SALT = os.environ.get("SECURITY_PASSWORD_SALT") # That's pepper actually
|
||||
|
||||
# Flask mail's stuff
|
||||
MAIL_SERVER = os.environ.get("MAIL_SERVER")
|
||||
MAIL_PORT = os.environ.get("MAIL_PORT", 465)
|
||||
MAIL_USE_SSL = os.environ.get('MAIL_USE_SSL', 'true').upper() == 'TRUE'
|
||||
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
|
||||
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
|
||||
SECURITY_EMAIL_SENDER = os.environ.get('SECURITY_EMAIL_SENDER', 'noreply@unstablevortex.kmlabz.com')
|
||||
|
||||
# Some constant configured stuff configs
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||
SECURITY_REGISTERABLE = True
|
||||
|
Reference in New Issue
Block a user