Increase search result count and sort by expire_date

This commit is contained in:
Tanner Collin 2020-02-26 04:32:50 +00:00
parent f82c7e4a73
commit 221e83ccab
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ def gen_search_strings():
Generate a cache dict of names to member ids for rapid string matching
'''
search_strings = {}
for m in models.Member.objects.all():
for m in models.Member.objects.order_by('-expire_date'):
string = '{} {}'.format(
m.preferred_name,
m.last_name,

View File

@ -37,7 +37,7 @@ Create = mixins.CreateModelMixin
Update = mixins.UpdateModelMixin
Destroy = mixins.DestroyModelMixin
NUM_SEARCH_RESULTS = 10
NUM_SEARCH_RESULTS = 20
class SearchViewSet(Base, Retrieve):