change contrib for middleware in ProfilerMiddleware
This commit is contained in:
parent
df2dd396ee
commit
f42ccba706
|
@ -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)
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Reference in a new issue