02/06/22 - 16h30
parent
fb7e13e816
commit
f9f2b3b726
|
@ -299,9 +299,18 @@ def add_articles_avis(diction):
|
|||
|
||||
local_status, my_internal_url = ES.Ela_Remove_Ponct_Special_Caractere(my_internal_url)
|
||||
my_internal_url = unidecode(my_internal_url.lower())
|
||||
if (my_internal_url.startswith('-')):
|
||||
my_internal_url = my_internal_url[1:]
|
||||
|
||||
if (my_internal_url.endswith('-')):
|
||||
my_internal_url = my_internal_url[:-1]
|
||||
|
||||
my_internal_url = my_internal_url.replace(" ","-")
|
||||
suffix = hashlib.md5(my_internal_url.encode()).hexdigest()
|
||||
mydata['internal_url'] = str(my_internal_url)+"-"+str(suffix[-3:])
|
||||
my_internal_url = str(my_internal_url)+"-"+str(suffix[-3:])
|
||||
my_internal_url.replace("---", "-").replace("--", "-")
|
||||
|
||||
mydata['internal_url'] = my_internal_url
|
||||
|
||||
|
||||
if ("user_ip" in diction.keys()):
|
||||
|
|
|
@ -1002,7 +1002,7 @@ def get_class_coup_de_coeur(diction):
|
|||
if ("internal_url" in diction.keys()):
|
||||
internal_url = str(diction['internal_url'])
|
||||
|
||||
print(" laaaa internal_url = "+internal_url)
|
||||
|
||||
for retVal in coll_name.find({'valide':'1','locked':'0','internal_url':internal_url, 'coeur':'1'},
|
||||
{"_id": 0, "indexed": 0, "indexed_desc": 0, "indexed_obj": 0, "indexed_title": 0,
|
||||
"valide": 0, "locked": 0, "partner_owner_recid": 0, }
|
||||
|
@ -1035,7 +1035,7 @@ def get_class_coup_de_coeur(diction):
|
|||
retVal['pedagogie'] = tmp_str[:MYSY_GV.MAX_CARACT_DETAIL] + " ..."
|
||||
|
||||
|
||||
mycommon.myprint(str(retVal))
|
||||
#mycommon.myprint(str(retVal))
|
||||
user = retVal
|
||||
RetObject.append(JSONEncoder().encode(user))
|
||||
|
||||
|
|
|
@ -806,7 +806,7 @@ def FormationAlaUne():
|
|||
try:
|
||||
|
||||
coll_name = MYSY_GV.dbname['myclass']
|
||||
df = pd.DataFrame(list(coll_name.find({'valide':'1'},{'_id':1, 'external_code':1})))
|
||||
df = pd.DataFrame(list(coll_name.find({'valide':'1', "price": {"$gte": 0} },{'_id':1, 'external_code':1 })))
|
||||
df['isalaune'] = '0'
|
||||
|
||||
|
||||
|
|
|
@ -185,11 +185,12 @@ def get_all_class(diction):
|
|||
insertObject = []
|
||||
|
||||
|
||||
for x in coll_name.find({'valide':'1', 'locked':'0', 'isalaune':'1'}, {"_id": 0, "indexed": 0, "indexed_desc": 0, "indexed_obj": 0, "indexed_title": 0,
|
||||
for x in coll_name.find({ "$or": [ {'valide':'1', 'locked':'0', 'isalaune':'1'}, { 'coeur': 1 } ] },
|
||||
{"_id": 0, "indexed": 0, "indexed_desc": 0, "indexed_obj": 0, "indexed_title": 0,
|
||||
"valide": 0, "locked": 0, "partner_owner_recid": 0, }).\
|
||||
limit(MYSY_GV.MAINPAGE_QUERY_LIMIT_ROW).\
|
||||
sort(
|
||||
[ ("coeur", pymongo.DESCENDING), ("date_update", pymongo.DESCENDING),]):
|
||||
[ ("coeur", pymongo.DESCENDING), ("price", pymongo.ASCENDING), ("date_update", pymongo.DESCENDING),]):
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue