按部门搜说

This commit is contained in:
caoqianming 2020-02-22 16:21:37 +08:00
parent 66d3730917
commit 6214e6bfbe
2 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -13,6 +13,7 @@
/mysite/settings.py
/safesite/token.txt
/web.config
/ratedata.dat
# Byte-compiled / optimized / DLL files
__pycache__/

View File

@ -6186,7 +6186,8 @@ def apiexamtestdetail(req):
if req.GET.get('search',None):
rows=[]
for i in data['rows']:
if req.GET.get('search') in i['user__name']:
search = req.GET.get('search')
if search in i['user__name'] or search in i['user__ubelongpart__partname']:
rows.append(i)
data['rows'] = rows[startnum:endnum]
return JsonResponse(data)