From ecfaf9f02d5bb951f0139900f6ae086982a4023b Mon Sep 17 00:00:00 2001 From: ibuler Date: Mon, 9 May 2016 18:54:33 +0800 Subject: [PATCH] =?UTF-8?q?modify(jperm)=20=E6=8E=88=E6=9D=83=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=A8=A1=E7=B3=8A=E6=90=9C=E7=B4=A2=20(#225)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改授权规则搜索为模糊搜索 --- jperm/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jperm/views.py b/jperm/views.py index 6e7036098..f546079c2 100644 --- a/jperm/views.py +++ b/jperm/views.py @@ -38,7 +38,7 @@ def perm_rule_list(request): rules_list = rules_list.filter(id=rule_id) if keyword: - rules_list = rules_list.filter(Q(name=keyword)) + rules_list = rules_list.filter(Q(name__icontains=keyword)) rules_list, p, rules, page_range, current_page, show_first, show_end = pages(rules_list, request)