From 85905f91e365125014faed1ed94e124bff54d4b2 Mon Sep 17 00:00:00 2001 From: esp Date: Sat, 29 Aug 2015 17:54:09 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=90=8E=E7=AB=AF]=E6=B7=BB=E5=8A=A0=E6=AF=94?= =?UTF-8?q?=E8=B5=9B,=E9=A2=98=E7=9B=AE=E5=88=97=E8=A1=A8=E9=A1=B5?= =?UTF-8?q?=E5=AF=B9=E6=8F=8F=E8=BF=B0=E7=9A=84=E6=A3=80=E7=B4=A2(?= =?UTF-8?q?=E5=8E=9F=E6=9D=A5=E4=BB=85=E5=AF=B9=E6=A0=87=E9=A2=98=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E5=85=B3=E9=94=AE=E5=AD=97)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contest/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contest/views.py b/contest/views.py index 4763bd8..2153f95 100644 --- a/contest/views.py +++ b/contest/views.py @@ -343,7 +343,7 @@ def contest_list_page(request, page=1): # 搜索的情况 keyword = request.GET.get("keyword", None) if keyword: - contests = contests.filter(title__contains=keyword) + contests = contests.filter(Q(title__contains=keyword) | Q(description__contains=keyword)) # 筛选我能参加的比赛 join = request.GET.get("join", None)