change contrib for middleware in ProfilerMiddleware

This commit is contained in:
Cayo Puigdefabregas 2022-09-29 16:58:30 +02:00
parent df2dd396ee
commit f42ccba706
2 changed files with 4 additions and 4 deletions

View file

@ -17,7 +17,7 @@ from ereuse_devicehub.workbench.views import workbench
# from flask_wtf.csrf import CSRFProtect # from flask_wtf.csrf import CSRFProtect
# from werkzeug.contrib.profiler import ProfilerMiddleware # from werkzeug.middleware.profiler import ProfilerMiddleware
SENTRY_DSN = config('SENTRY_DSN', None) SENTRY_DSN = config('SENTRY_DSN', None)

View file

@ -1,9 +1,9 @@
from ereuse_devicehub.devicehub import Devicehub from werkzeug.middleware.profiler import ProfilerMiddleware
from werkzeug.contrib.profiler import ProfilerMiddleware
from ereuse_devicehub.devicehub import Devicehub
app = Devicehub(inventory='dbtest') app = Devicehub(inventory='dbtest')
app.config["SQLALCHEMY_RECORD_QUERIES"] = True app.config["SQLALCHEMY_RECORD_QUERIES"] = True
app.config['PROFILE'] = True app.config['PROFILE'] = True
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30])
app.run(debug = True) app.run(debug=True)