03/01/2025 - 17h30
parent
860ec388ae
commit
2184118a86
|
@ -1,10 +1,15 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="sdfdd">
|
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="31/12/2024 - 12h30">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Activite.py" beforeDir="false" afterPath="$PROJECT_DIR$/Activite.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/articles_avis.py" beforeDir="false" afterPath="$PROJECT_DIR$/articles_avis.py" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/articles_avis.py" beforeDir="false" afterPath="$PROJECT_DIR$/articles_avis.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -75,13 +80,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1680804787304</updated>
|
<updated>1680804787304</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00376" summary="20/08/2024 - 13h55">
|
|
||||||
<created>1724154821336</created>
|
|
||||||
<option name="number" value="00376" />
|
|
||||||
<option name="presentableId" value="LOCAL-00376" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1724154821337</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00377" summary="20/08/2024 - 21h55">
|
<task id="LOCAL-00377" summary="20/08/2024 - 21h55">
|
||||||
<created>1724183059275</created>
|
<created>1724183059275</created>
|
||||||
<option name="number" value="00377" />
|
<option name="number" value="00377" />
|
||||||
|
@ -418,7 +416,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1735590718077</updated>
|
<updated>1735590718077</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="425" />
|
<task id="LOCAL-00425" summary="31/12/2024 - 12h30">
|
||||||
|
<created>1735645810802</created>
|
||||||
|
<option name="number" value="00425" />
|
||||||
|
<option name="presentableId" value="LOCAL-00425" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1735645810803</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="426" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.Tabs.Properties">
|
<component name="Vcs.Log.Tabs.Properties">
|
||||||
|
@ -460,7 +465,6 @@
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<MESSAGE value="25/09/2024 - 15h" />
|
|
||||||
<MESSAGE value="sdfsd" />
|
<MESSAGE value="sdfsd" />
|
||||||
<MESSAGE value="sdfsdsdsd" />
|
<MESSAGE value="sdfsdsdsd" />
|
||||||
<MESSAGE value="05/10/2024 - 12h" />
|
<MESSAGE value="05/10/2024 - 12h" />
|
||||||
|
@ -485,6 +489,7 @@
|
||||||
<MESSAGE value="sdf" />
|
<MESSAGE value="sdf" />
|
||||||
<MESSAGE value="sdfd" />
|
<MESSAGE value="sdfd" />
|
||||||
<MESSAGE value="sdfdd" />
|
<MESSAGE value="sdfdd" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="sdfdd" />
|
<MESSAGE value="31/12/2024 - 12h30" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="31/12/2024 - 12h30" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -1030,12 +1030,12 @@ def Get_Nb_New_Activite_Assigne_To_Me_Token(diction):
|
||||||
data_cle['locked'] = "0"
|
data_cle['locked'] = "0"
|
||||||
data_cle['employee_assigned_view_statut'] = {'$ne':'1'}
|
data_cle['employee_assigned_view_statut'] = {'$ne':'1'}
|
||||||
|
|
||||||
print(" ### data_cle new = ", data_cle)
|
#print(" ### data_cle new = ", data_cle)
|
||||||
|
|
||||||
nb_new_activite_assigned_to_me = MYSY_GV.dbname['activite'].count_documents(data_cle)
|
nb_new_activite_assigned_to_me = MYSY_GV.dbname['activite'].count_documents(data_cle)
|
||||||
|
|
||||||
|
|
||||||
print(" ### il y a "+str(nb_new_activite_assigned_to_me)+" nouvelles activité ")
|
#print(" ### il y a "+str(nb_new_activite_assigned_to_me)+" nouvelles activité ")
|
||||||
|
|
||||||
return True, str(nb_new_activite_assigned_to_me)
|
return True, str(nb_new_activite_assigned_to_me)
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@ HELP_WORD_QUERY_LIMIT = 3
|
||||||
'''
|
'''
|
||||||
Les formats d'image accepté
|
Les formats d'image accepté
|
||||||
'''
|
'''
|
||||||
IMG_FORMAT=['jpg', 'jpeg', 'png', 'jpe', 'webp', 'gif']
|
IMG_FORMAT=['jpg', 'jpeg', 'png', 'jpe', 'webp', 'gif',]
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Image au formation PNG UNIQUEMENT
|
Image au formation PNG UNIQUEMENT
|
||||||
|
|
5200
Log/log_file.log
5200
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -906,9 +906,9 @@ def add_articles_avis(diction):
|
||||||
meta_description = ""
|
meta_description = ""
|
||||||
if ("meta_description" in diction.keys()):
|
if ("meta_description" in diction.keys()):
|
||||||
if diction['meta_description']:
|
if diction['meta_description']:
|
||||||
meta_description = str(diction['meta_description']).strip().lower()[0:154]
|
meta_description = str(diction['meta_description']).strip().lower()[0:200]
|
||||||
else:
|
else:
|
||||||
meta_description = str(diction['title_formation']).strip().lower()[0:154]
|
meta_description = str(diction['title_formation']).strip().lower()[0:200]
|
||||||
mydata['meta_description'] = meta_description
|
mydata['meta_description'] = meta_description
|
||||||
|
|
||||||
|
|
||||||
|
@ -1126,9 +1126,9 @@ def update_articles_avis(diction):
|
||||||
meta_description = ""
|
meta_description = ""
|
||||||
if ("meta_description" in diction.keys()):
|
if ("meta_description" in diction.keys()):
|
||||||
if diction['meta_description']:
|
if diction['meta_description']:
|
||||||
meta_description = str(diction['meta_description']).strip().lower()[0:154]
|
meta_description = str(diction['meta_description']).strip().lower()[0:200]
|
||||||
else:
|
else:
|
||||||
meta_description = str(diction['title_formation']).strip().lower()[0:154]
|
meta_description = str(diction['title_formation']).strip().lower()[0:200]
|
||||||
mydata['meta_description'] = meta_description
|
mydata['meta_description'] = meta_description
|
||||||
|
|
||||||
|
|
||||||
|
@ -1526,8 +1526,6 @@ def Blog_Img_Store_Article_Image(file=None, Folder=None, diction=None):
|
||||||
if diction['token']:
|
if diction['token']:
|
||||||
my_token = diction['token']
|
my_token = diction['token']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
partner_recid = mycommon.get_parnter_recid_from_token(my_token)
|
partner_recid = mycommon.get_parnter_recid_from_token(my_token)
|
||||||
if (partner_recid is False):
|
if (partner_recid is False):
|
||||||
mycommon.myprint(
|
mycommon.myprint(
|
||||||
|
@ -1548,7 +1546,6 @@ def Blog_Img_Store_Article_Image(file=None, Folder=None, diction=None):
|
||||||
return False, saved_file
|
return False, saved_file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cnopts = pysftp.CnOpts()
|
cnopts = pysftp.CnOpts()
|
||||||
cnopts.hostkeys = None
|
cnopts.hostkeys = None
|
||||||
with pysftp.Connection(host=MYSY_GV.MYSY_FTP_HOST, username=MYSY_GV.MYSY_FTP_LOGIN,
|
with pysftp.Connection(host=MYSY_GV.MYSY_FTP_HOST, username=MYSY_GV.MYSY_FTP_LOGIN,
|
||||||
|
|
|
@ -3029,6 +3029,9 @@ la clé est : l'external code.
|
||||||
- le token du partenaire. le token permet d'aller chercher le "rec_id"
|
- le token du partenaire. le token permet d'aller chercher le "rec_id"
|
||||||
|
|
||||||
Seules les formations "locked = 0 et valide = 1" sont recuperables par l'API
|
Seules les formations "locked = 0 et valide = 1" sont recuperables par l'API
|
||||||
|
|
||||||
|
03/01/2025 : la hierarchie d'affichage des formations est :
|
||||||
|
[Categorie, Domaine, metier]
|
||||||
'''
|
'''
|
||||||
def get_partner_class(diction):
|
def get_partner_class(diction):
|
||||||
try:
|
try:
|
||||||
|
@ -3179,6 +3182,8 @@ def get_partner_class(diction):
|
||||||
'indexed_obj':0, 'indexed_title':0, }
|
'indexed_obj':0, 'indexed_title':0, }
|
||||||
).sort([("_id", pymongo.DESCENDING), ]):
|
).sort([("_id", pymongo.DESCENDING), ]):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#print(" #### retVal = ", retVal)
|
#print(" #### retVal = ", retVal)
|
||||||
if ("title" not in retVal.keys()):
|
if ("title" not in retVal.keys()):
|
||||||
retVal['title'] = ""
|
retVal['title'] = ""
|
||||||
|
@ -3463,6 +3468,8 @@ def find_partner_class_like(diction):
|
||||||
).sort([("_id", pymongo.DESCENDING), ]):
|
).sort([("_id", pymongo.DESCENDING), ]):
|
||||||
#mycommon.myprint(str(retVal))
|
#mycommon.myprint(str(retVal))
|
||||||
user = retVal
|
user = retVal
|
||||||
|
|
||||||
|
|
||||||
if ("title" not in retVal.keys()):
|
if ("title" not in retVal.keys()):
|
||||||
retVal['title'] = ""
|
retVal['title'] = ""
|
||||||
|
|
||||||
|
|
2
main.py
2
main.py
|
@ -1359,7 +1359,7 @@ Cette API ajouter un article/avis
|
||||||
def add_articles_avis():
|
def add_articles_avis():
|
||||||
# On recupere le corps (payload) de la requete
|
# On recupere le corps (payload) de la requete
|
||||||
payload = mycommon.strip_dictionary (request.form.to_dict())
|
payload = mycommon.strip_dictionary (request.form.to_dict())
|
||||||
print(" ### payload = payload = (trop long cherif) ")
|
print(" ### add_articles_avis payload = (trop long cherif) ")
|
||||||
|
|
||||||
status, retval = aa.add_articles_avis(payload)
|
status, retval = aa.add_articles_avis(payload)
|
||||||
|
|
||||||
|
|
|
@ -214,6 +214,9 @@ def Upload_Save_IMG_File(file=None, Folder=None):
|
||||||
|
|
||||||
def Upload_Save_IMG_File_No_Change_Origial_Name(file=None, Folder=None):
|
def Upload_Save_IMG_File_No_Change_Origial_Name(file=None, Folder=None):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
print(" ### file.filename === ", file.filename)
|
||||||
|
|
||||||
basename = os.path.basename(file.filename)
|
basename = os.path.basename(file.filename)
|
||||||
basename2 = basename.split(".")
|
basename2 = basename.split(".")
|
||||||
|
|
||||||
|
@ -515,7 +518,7 @@ def get_partner_data_from_recid(user_recid = ""):
|
||||||
|
|
||||||
coll_token = MYSY_GV.dbname['partnair_account']
|
coll_token = MYSY_GV.dbname['partnair_account']
|
||||||
|
|
||||||
print(" FFFF = ",{'recid': str(user_recid), 'active': '1', 'locked':'0'} )
|
#print(" FFFF = ",{'recid': str(user_recid), 'active': '1', 'locked':'0'} )
|
||||||
|
|
||||||
tmp_val = coll_token.find_one({'recid': str(user_recid), 'active': '1', 'locked':'0'})
|
tmp_val = coll_token.find_one({'recid': str(user_recid), 'active': '1', 'locked':'0'})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue