Validation 13/03/22 - 20h21
parent
e3cc35a035
commit
e294a3899c
12
wrapper.py
12
wrapper.py
|
@ -121,7 +121,7 @@ def get_all_class(diction):
|
||||||
# Dictionnaire des champs utilisables
|
# Dictionnaire des champs utilisables
|
||||||
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
|
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
|
||||||
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
|
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
|
||||||
'support', 'type', 'lang', 'price']
|
'support', 'type', 'lang', 'price', 'distance']
|
||||||
|
|
||||||
incom_keys = diction.keys()
|
incom_keys = diction.keys()
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ def recherche_text_simple(diction):
|
||||||
'''
|
'''
|
||||||
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
|
field_list = ['token', 'user_ip', 'user_country_code', 'user_country_name', 'user_city',
|
||||||
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
|
'user_postal', 'user_latitude', 'user_longitude', 'user_state', 'search_text', 'certif',
|
||||||
'support', 'type', 'lang', 'price']
|
'support', 'type', 'lang', 'price', 'distance']
|
||||||
incom_keys = diction.keys()
|
incom_keys = diction.keys()
|
||||||
for val in incom_keys:
|
for val in incom_keys:
|
||||||
if val not in field_list:
|
if val not in field_list:
|
||||||
|
@ -288,6 +288,14 @@ def recherche_text_simple(diction):
|
||||||
lang_crit['lang'] = diction['lang']
|
lang_crit['lang'] = diction['lang']
|
||||||
new_diction['lang'] = diction['lang']
|
new_diction['lang'] = diction['lang']
|
||||||
|
|
||||||
|
distance_crit = {}
|
||||||
|
if ("distance" in diction.keys()):
|
||||||
|
if diction['distance']:
|
||||||
|
critere_date['distance'] = diction['distance']
|
||||||
|
if (str(diction['distance']) != "0"):
|
||||||
|
distance_crit['distance'] = diction['distance']
|
||||||
|
new_diction['distance'] = diction['distance']
|
||||||
|
|
||||||
'''
|
'''
|
||||||
/!\ Important : si le token est vide, alors c'est une recherche faite en mode non-connecté.
|
/!\ Important : si le token est vide, alors c'est une recherche faite en mode non-connecté.
|
||||||
on doit l'accepter.
|
on doit l'accepter.
|
||||||
|
|
Loading…
Reference in New Issue