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.
2 parents f9e87cf + 8766a43 commit 20f6c70Copy full SHA for 20f6c70
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