From 9c042b4f7d623b41c415ccdf7b23b4c747d2076f Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Fri, 6 Apr 2018 21:21:41 +0000 Subject: [PATCH] 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 --- patch/add-django-cprofile-filter.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patch/add-django-cprofile-filter.patch b/patch/add-django-cprofile-filter.patch index 4c469ff4e..128d5a9f0 100644 --- a/patch/add-django-cprofile-filter.patch +++ b/patch/add-django-cprofile-filter.patch @@ -1,5 +1,5 @@ --- django_cprofile_middleware/middleware.py.old 2018-04-04 06:32:29.282187502 -0700 -+++ django_cprofile_middleware/middleware.py 2018-04-04 06:44:00.126537763 -0700 ++++ django_cprofile_middleware/middleware.py 2018-04-06 10:11:18.936855634 -0700 @@ -1,4 +1,5 @@ import pstats +import re @@ -34,7 +34,7 @@ + filter = request.GET.get('filter', None) + if filter: + stats.filter_stats(filter) -+ stats.sort_stats(request.GET.get('sort', 'time')) ++ stats.sort_stats(request.GET.get('psort') or 'time') stats.print_stats(int(request.GET.get('count', 100))) response = HttpResponse('
%s
' % io.getvalue()) return response