Skip to content

Commit 9c042b4

Browse files
committed
Tweaked the django_cprofile_middleware patch to use a query arg of psort instead of sort, to avoid conflict with app query args 'sort'.
- Legacy-Id: 15021
1 parent 248c2dd commit 9c042b4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

patch/add-django-cprofile-filter.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--- django_cprofile_middleware/middleware.py.old 2018-04-04 06:32:29.282187502 -0700
2-
+++ django_cprofile_middleware/middleware.py 2018-04-04 06:44:00.126537763 -0700
2+
+++ django_cprofile_middleware/middleware.py 2018-04-06 10:11:18.936855634 -0700
33
@@ -1,4 +1,5 @@
44
import pstats
55
+import re
@@ -34,7 +34,7 @@
3434
+ filter = request.GET.get('filter', None)
3535
+ if filter:
3636
+ stats.filter_stats(filter)
37-
+ stats.sort_stats(request.GET.get('sort', 'time'))
37+
+ stats.sort_stats(request.GET.get('psort') or 'time')
3838
stats.print_stats(int(request.GET.get('count', 100)))
3939
response = HttpResponse('<pre>%s</pre>' % io.getvalue())
4040
return response

0 commit comments

Comments
 (0)