Skip to content

Commit 20f6c70

Browse files
authored
Merge pull request #11 from faost/master
Using MiddlewareMixin
2 parents f9e87cf + 8766a43 commit 20f6c70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

django_cprofile_middleware/middleware.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pstats
2+
23
try:
34
import cProfile as profile
45
except ImportError:
@@ -10,9 +11,10 @@
1011

1112
from django.conf import settings
1213
from django.http import HttpResponse
14+
from django.utils.deprecation import MiddlewareMixin
1315

1416

15-
class ProfilerMiddleware(object):
17+
class ProfilerMiddleware(MiddlewareMixin):
1618
"""
1719
Simple profile middleware to profile django views. To run it, add ?prof to
1820
the URL like this:

0 commit comments

Comments
 (0)