Improve search with legal first name
This commit is contained in:
parent
e6beab0ff6
commit
74dfdc6c06
|
@ -144,16 +144,18 @@ def gen_search_strings():
|
||||||
'''
|
'''
|
||||||
search_strings = {}
|
search_strings = {}
|
||||||
for m in models.Member.objects.order_by('-expire_date'):
|
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,
|
||||||
|
m.first_name,
|
||||||
|
m.last_name,
|
||||||
)
|
)
|
||||||
|
|
||||||
if m.old_email:
|
if m.old_email:
|
||||||
string += ' ' + m.old_email
|
string += ' | ' + m.old_email
|
||||||
if m.user:
|
if m.user:
|
||||||
string += ' ' + m.user.email
|
string += ' | ' + m.user.email
|
||||||
string += ' ' + str(m.id)
|
string += ' | ' + str(m.id)
|
||||||
|
|
||||||
string = string.lower()
|
string = string.lower()
|
||||||
search_strings[string] = m.id
|
search_strings[string] = m.id
|
||||||
|
|
Loading…
Reference in New Issue
Block a user