From f42ccba706a590aca3fb463c85deeb279825fea4 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 29 Sep 2022 16:58:30 +0200 Subject: [PATCH] change contrib for middleware in ProfilerMiddleware --- examples/app.py | 2 +- examples/app_cprofile.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/app.py b/examples/app.py index 47671ec9..623bfaef 100644 --- a/examples/app.py +++ b/examples/app.py @@ -17,7 +17,7 @@ from ereuse_devicehub.workbench.views import workbench # from flask_wtf.csrf import CSRFProtect -# from werkzeug.contrib.profiler import ProfilerMiddleware +# from werkzeug.middleware.profiler import ProfilerMiddleware SENTRY_DSN = config('SENTRY_DSN', None) diff --git a/examples/app_cprofile.py b/examples/app_cprofile.py index e9f7d3fd..834f2f31 100644 --- a/examples/app_cprofile.py +++ b/examples/app_cprofile.py @@ -1,9 +1,9 @@ -from ereuse_devicehub.devicehub import Devicehub -from werkzeug.contrib.profiler import ProfilerMiddleware +from werkzeug.middleware.profiler import ProfilerMiddleware +from ereuse_devicehub.devicehub import Devicehub app = Devicehub(inventory='dbtest') app.config["SQLALCHEMY_RECORD_QUERIES"] = True app.config['PROFILE'] = True app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30]) -app.run(debug = True) +app.run(debug=True)