Moved from deprecated stuff to new stuff
This commit is contained in:
parent
7f513d05b2
commit
8995736374
@ -1,6 +1,6 @@
|
||||
flask
|
||||
flask-classful
|
||||
flask-security
|
||||
flask-security-too
|
||||
flask-admin
|
||||
gunicorn
|
||||
sentry-sdk[flask]
|
||||
@ -14,4 +14,5 @@ email_validator
|
||||
minio
|
||||
flask-minio
|
||||
bleach
|
||||
bcrypt
|
||||
bcrypt
|
||||
flask-mail
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user