02/07/22 - 22h30

master
ChérifBALDE 2022-07-02 23:05:57 +02:00 committed by cherif
parent 55288d6627
commit 3e0b1e91a9
1 changed files with 5 additions and 2 deletions

View File

@ -236,6 +236,9 @@ Si on veut UNIQUEMENT diffuser une formation dans une ville, alors il faut :
- reseigner le champs : zone_diffusion.city - reseigner le champs : zone_diffusion.city
- Laisser le champs : zone_diffusion.country à VIDE. - Laisser le champs : zone_diffusion.country à VIDE.
/!\ IMPORTANT2 : La formation doit etre à la une :
donc le paramttrafe "isalaune" = 1
Par defaut, le système cherche les diffuser dans un pays ou dans une ville. Par defaut, le système cherche les diffuser dans un pays ou dans une ville.
le champs pays est renseigner, alors la formation a est diffuser dans tous le pays. le champs pays est renseigner, alors la formation a est diffuser dans tous le pays.
@ -305,8 +308,8 @@ def get_training_in_user_zone(diction):
print(" critère de recherche : user_country_code = "+str(mydata['user_country_code']).lower()+" ---- user_city = "+str(mydata['user_city']).lower()) print(" critère de recherche : user_country_code = "+str(mydata['user_country_code']).lower()+" ---- user_city = "+str(mydata['user_city']).lower())
for x in coll_name.find({ "$or": [ {'valide':'1', 'locked':'0', "zone_diffusion.country":str(mydata['user_country_code']).lower()}, for x in coll_name.find({ "$or": [ {'valide':'1', 'locked':'0', 'isalaune':'1', "zone_diffusion.country":str(mydata['user_country_code']).lower()},
{'valide':'1', 'locked':'0', "zone_diffusion.city":str(mydata['user_city']).lower()} ] }, {'valide':'1', 'locked':'0', 'isalaune':'1', "zone_diffusion.city":str(mydata['user_city']).lower()} ] },
{"_id": 0, "indexed": 0, "indexed_desc": 0, "indexed_obj": 0, "indexed_title": 0, {"_id": 0, "indexed": 0, "indexed_desc": 0, "indexed_obj": 0, "indexed_title": 0,
"valide": 0, "locked": 0, "partner_owner_recid": 0, }).\ "valide": 0, "locked": 0, "partner_owner_recid": 0, }).\
limit(MYSY_GV.MAINPAGE_QUERY_LIMIT_ROW).\ limit(MYSY_GV.MAINPAGE_QUERY_LIMIT_ROW).\