We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f9e87cf commit 8766a43Copy full SHA for 8766a43
django_cprofile_middleware/middleware.py
@@ -1,4 +1,5 @@
1
import pstats
2
+
3
try:
4
import cProfile as profile
5
except ImportError:
@@ -10,9 +11,10 @@
10
11
12
from django.conf import settings
13
from django.http import HttpResponse
14
+from django.utils.deprecation import MiddlewareMixin
15
16
-class ProfilerMiddleware(object):
17
+class ProfilerMiddleware(MiddlewareMixin):
18
"""
19
Simple profile middleware to profile django views. To run it, add ?prof to
20
the URL like this:
0 commit comments