Moved from deprecated stuff to new stuff
This commit is contained in:
parent
7f513d05b2
commit
8995736374
@ -1,6 +1,6 @@
|
|||||||
flask
|
flask
|
||||||
flask-classful
|
flask-classful
|
||||||
flask-security
|
flask-security-too
|
||||||
flask-admin
|
flask-admin
|
||||||
gunicorn
|
gunicorn
|
||||||
sentry-sdk[flask]
|
sentry-sdk[flask]
|
||||||
@ -15,3 +15,4 @@ minio
|
|||||||
flask-minio
|
flask-minio
|
||||||
bleach
|
bleach
|
||||||
bcrypt
|
bcrypt
|
||||||
|
flask-mail
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
import logging
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
import sentry_sdk
|
import sentry_sdk
|
||||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||||
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
||||||
from healthcheck import HealthCheck
|
from healthcheck import HealthCheck
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
|
from flask_mail import Mail
|
||||||
|
|
||||||
from utils import Config
|
from utils import Config
|
||||||
from utils import health_database_status, init_security_real_good
|
from utils import health_database_status, init_security_real_good
|
||||||
@ -41,6 +41,7 @@ health = HealthCheck()
|
|||||||
db.init_app(app)
|
db.init_app(app)
|
||||||
init_security_real_good(app)
|
init_security_real_good(app)
|
||||||
CORS(app)
|
CORS(app)
|
||||||
|
Mail(app)
|
||||||
|
|
||||||
for view in [ItemView, ProfileView, UploadView, IndexView]:
|
for view in [ItemView, ProfileView, UploadView, IndexView]:
|
||||||
view.register(app, trailing_slash=False)
|
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
|
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
|
# Some constant configured stuff configs
|
||||||
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
SQLALCHEMY_TRACK_MODIFICATIONS = False
|
||||||
SECURITY_REGISTERABLE = True
|
SECURITY_REGISTERABLE = True
|
||||||
|
Loading…
Reference in New Issue
Block a user