Increase search result count and sort by expire_date
This commit is contained in:
parent
f82c7e4a73
commit
221e83ccab
|
@ -136,7 +136,7 @@ def gen_search_strings():
|
||||||
Generate a cache dict of names to member ids for rapid string matching
|
Generate a cache dict of names to member ids for rapid string matching
|
||||||
'''
|
'''
|
||||||
search_strings = {}
|
search_strings = {}
|
||||||
for m in models.Member.objects.all():
|
for m in models.Member.objects.order_by('-expire_date'):
|
||||||
string = '{} {}'.format(
|
string = '{} {}'.format(
|
||||||
m.preferred_name,
|
m.preferred_name,
|
||||||
m.last_name,
|
m.last_name,
|
||||||
|
|
|
@ -37,7 +37,7 @@ Create = mixins.CreateModelMixin
|
||||||
Update = mixins.UpdateModelMixin
|
Update = mixins.UpdateModelMixin
|
||||||
Destroy = mixins.DestroyModelMixin
|
Destroy = mixins.DestroyModelMixin
|
||||||
|
|
||||||
NUM_SEARCH_RESULTS = 10
|
NUM_SEARCH_RESULTS = 20
|
||||||
|
|
||||||
|
|
||||||
class SearchViewSet(Base, Retrieve):
|
class SearchViewSet(Base, Retrieve):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user