Added a profiling middleware to development settings, if found during django setup.

- Legacy-Id: 14984
This commit is contained in:
Henrik Levkowetz 2018-04-01 15:24:38 +00:00
parent 1bbe5cf9ef
commit dde5cfb11e

View file

@ -1051,3 +1051,9 @@ if SERVER_MODE != 'production':
ALLOWED_HOSTS = ['*',]
try:
# see https://github.com/omarish/django-cprofile-middleware
import django_cprofile_middleware # pyflakes:ignore
MIDDLEWARE = MIDDLEWARE + ('django_cprofile_middleware.middleware.ProfilerMiddleware', )
except ImportError:
pass