clean example app.py

This commit is contained in:
Cayo Puigdefabregas 2023-09-28 13:15:46 +02:00
parent 4ba7bcc956
commit 5fa6f46acc
1 changed files with 0 additions and 20 deletions

View File

@ -11,7 +11,6 @@ from ereuse_devicehub.config import DevicehubConfig
from ereuse_devicehub.devicehub import Devicehub
from ereuse_devicehub.inventory.views import devices
from ereuse_devicehub.labels.views import labels
from ereuse_devicehub.mail.flask_mail import Mail
from ereuse_devicehub.views import core
from ereuse_devicehub.workbench.views import workbench
from ereuse_devicehub.modules.did.views import did
@ -25,23 +24,6 @@ from ereuse_devicehub.modules.oidc.oauth2 import config_oauth
# from werkzeug.middleware.profiler import ProfilerMiddleware
SENTRY_DSN = config('SENTRY_DSN', None)
if SENTRY_DSN:
import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration
sentry_sdk.init(
dsn=SENTRY_DSN,
integrations=[
FlaskIntegration(),
],
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
traces_sample_rate=1.0,
)
app = Devicehub(inventory=DevicehubConfig.DB_SCHEMA)
app.register_blueprint(core)
app.register_blueprint(devices)
@ -52,8 +34,6 @@ app.register_blueprint(did)
app.register_blueprint(dpp)
app.register_blueprint(oidc)
mail = Mail(app)
app.mail = mail
config_oauth(app)