19/01/23 - 17h
parent
577d27e06f
commit
8bd9c66bdb
|
@ -1,10 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="15/01/2023 - 22h">
|
||||
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="18/01/23 - 22h">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Emargement/test_emargement.pdf" beforeDir="false" afterPath="$PROJECT_DIR$/Emargement/test_emargement.pdf" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.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$/tools_cherif/tools_cherif.py" beforeDir="false" afterPath="$PROJECT_DIR$/tools_cherif/tools_cherif.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/Session_Formation.py" beforeDir="false" afterPath="$PROJECT_DIR$/Session_Formation.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/data_indexees.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data_indexees.csv" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/email_inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_inscription_mgt.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -203,7 +208,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1673817096179</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="20" />
|
||||
<task id="LOCAL-00020" summary="18/01/23 - 21h">
|
||||
<created>1674074181794</created>
|
||||
<option name="number" value="00020" />
|
||||
<option name="presentableId" value="LOCAL-00020" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1674074181794</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="21" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
|
@ -236,7 +248,8 @@
|
|||
<MESSAGE value="09/01/22 à 11h" />
|
||||
<MESSAGE value="13/01/22 à 20h" />
|
||||
<MESSAGE value="15/01/2023 - 22h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="15/01/2023 - 22h" />
|
||||
<MESSAGE value="18/01/23 - 21h" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="18/01/23 - 21h" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
|
|
@ -40,7 +40,7 @@ endobj
|
|||
<<
|
||||
/Contents 11 0 R /MediaBox [ 0 0 595.2756 841.8898 ] /Parent 10 0 R /Resources <<
|
||||
/Font 1 0 R /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /XObject <<
|
||||
/FormXob.7b1dcb7c9a100b9093e5e1bb749441ff 3 0 R
|
||||
/FormXob.c2ae3de0635600e3618a37ea8ef85707 3 0 R
|
||||
>>
|
||||
>> /Rotate 0 /Trans <<
|
||||
|
||||
|
@ -55,7 +55,7 @@ endobj
|
|||
endobj
|
||||
9 0 obj
|
||||
<<
|
||||
/Author () /CreationDate (D:20221216204742-01'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20221216204742-01'00') /Producer (xhtml2pdf <https://github.com/xhtml2pdf/xhtml2pdf/>)
|
||||
/Author () /CreationDate (D:20230119154403-01'00') /Creator (\(unspecified\)) /Keywords () /ModDate (D:20230119154403-01'00') /Producer (xhtml2pdf <https://github.com/xhtml2pdf/xhtml2pdf/>)
|
||||
/Subject () /Title () /Trapped /False
|
||||
>>
|
||||
endobj
|
||||
|
@ -66,10 +66,10 @@ endobj
|
|||
endobj
|
||||
11 0 obj
|
||||
<<
|
||||
/Filter [ /ASCII85Decode /FlateDecode ] /Length 1816
|
||||
/Filter [ /ASCII85Decode /FlateDecode ] /Length 1821
|
||||
>>
|
||||
stream
|
||||
Gb!;fbAJ7X']&(*\8*"u1uFA\>,3bh,]2@NO[V3l/K8jXWK@qVpNoJWaE_GUQa5%j@/,<34m1Zho%Y,1_[1rK*e3#t$2Jj=0!@7nJkYV==&b=HHh,@%nmuhNhu#K<3%C1jL0,h%Q!+/G%Yq74rF?Z'Zuf8/@>SOE0um^961/&<QoMY747JSn2H8mb*Vcbf-3OXt1gG`rbH(;Jq.W!iG0Y#Ek4Zg@3+I$U]NjY(T?jY19(BMTnobI&W+D+oo%O:(nK_%2*VcL),!=tM5n[!rV4QO5q3L<=hhN@1I8)>/j"MA&;8RJ%PScu_@09HF*HbC)S<+Xg#Y(X)L,d>/jj"IAWTQO^74;tB_dTR0J\dX_c7/Mc=`hUs[;Ze[!0rmP,/f>:RgR=qn5*PH<>p<Jp]Jt"P?72pT!f#Iqnll'gY=HJMq.Mk149;<bkO//btNbrVE$Lrce:>QIQ([im&scgB5a4$O-.cL@iq+YSpE?&.lGi.]*,3fjdq#c7hh`<$)\&a9u2dnEIQ@\:p7Oi4poBs(EDAG+[T,h[8b'oY_:MSfZ*b:fX$a[jf=9kXe)E&^3hJ0%BNnjd;8]a?BI2-O87gFqa>>QX4?3AqmY)QM(H*r\+MS\BirBJ<c[SO).1(J_;`4\I<3NLV-lX.^pr0b7+?7p!`6##h9GM.R:2tmm_`N.&ZPM(Gj#LQ.1/Q=^070lEZr?HGe%H6_(F"ci^=hDG<pX'\47\YL+3Zn7P+0*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17f9cafcdb46e4389b><05bd998f8d6d3a17f9cafcdb46e4389b>]
|
||||
% ReportLab generated PDF document -- digest (http://www.reportlab.com)
|
||||
|
||||
/Info 9 0 R
|
||||
|
@ -96,5 +96,5 @@ trailer
|
|||
/Size 12
|
||||
>>
|
||||
startxref
|
||||
10204
|
||||
10209
|
||||
%%EOF
|
||||
|
|
|
@ -82,10 +82,18 @@ def AddStagiairetoClass(diction):
|
|||
for tmp_val in MYSY_GV.dbname['session_formation'].find({"formation_session_id":str(session_id)}):
|
||||
mydata['date_du'] = tmp_val['date_debut']
|
||||
mydata['date_au'] = tmp_val['date_fin']
|
||||
mydata['ville'] = tmp_val['ville']
|
||||
mydata['code_postal'] = tmp_val['code_postal']
|
||||
mydata['adresse'] = tmp_val['adresse']
|
||||
|
||||
if ("ville" in tmp_val.keys()):
|
||||
if tmp_val['ville']:
|
||||
mydata['ville'] = tmp_val['ville']
|
||||
|
||||
if ("code_postal" in tmp_val.keys()):
|
||||
if tmp_val['code_postal']:
|
||||
mydata['code_postal'] = tmp_val['code_postal']
|
||||
|
||||
if ("adresse" in tmp_val.keys()):
|
||||
if tmp_val['adresse']:
|
||||
mydata['adresse'] = tmp_val['adresse']
|
||||
|
||||
|
||||
print(" #### mydata = "+str(mydata))
|
||||
|
@ -673,32 +681,32 @@ def SendPre_InscriptionEmail(diction):
|
|||
return False, " impossible d'envoyer le mail de presinscription. la session "+str(diction['session_id'])+" est introuvable "
|
||||
|
||||
if ("code_postal" in local_info_session[0].keys()):
|
||||
if local_session[0]['code_postal']:
|
||||
if local_info_session[0]['code_postal']:
|
||||
data_mail['code_postal'] = local_info_session[0]['code_postal']
|
||||
|
||||
if ("date_debut" in local_info_session[0].keys()):
|
||||
if local_session[0]['date_debut']:
|
||||
if local_info_session[0]['date_debut']:
|
||||
data_mail['date_du'] = str(local_info_session[0]['date_debut'])[0:10]
|
||||
|
||||
if ("date_fin" in local_info_session[0].keys()):
|
||||
if local_session[0]['date_fin']:
|
||||
if local_info_session[0]['date_fin']:
|
||||
data_mail['date_au'] = str(local_info_session[0]['date_fin'])[0:10]
|
||||
|
||||
|
||||
if ("formateur" in local_info_session[0].keys()):
|
||||
if local_session[0]['formateur']:
|
||||
if local_info_session[0]['formateur']:
|
||||
data_mail['formateur'] = local_info_session[0]['formateur']
|
||||
|
||||
if ("distantiel" in local_info_session[0].keys()):
|
||||
if local_session[0]['distantiel']:
|
||||
if local_info_session[0]['distantiel']:
|
||||
data_mail['distantiel'] = local_info_session[0]['distantiel']
|
||||
|
||||
if ("presentiel" in local_info_session[0].keys()):
|
||||
if local_session[0]['presentiel']:
|
||||
if local_info_session[0]['presentiel']:
|
||||
data_mail['presentiel'] = local_info_session[0]['presentiel']
|
||||
|
||||
if ("ville" in local_info_session[0].keys()):
|
||||
if local_session[0]['ville']:
|
||||
if local_info_session[0]['ville']:
|
||||
data_mail['ville'] = local_info_session[0]['ville']
|
||||
|
||||
|
||||
|
@ -995,7 +1003,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - La valeur '" + val + "' n'est pas presente dans liste ")
|
||||
return False, " Verifier votre API"
|
||||
return False, " Verifier votre API, Toutes les informations techniques ne sont pas fournies"
|
||||
|
||||
my_token = ""
|
||||
if ("token" in diction.keys()):
|
||||
|
@ -1010,13 +1018,13 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
if(len(str(session_id).strip()) <= 0 ):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " La session de formation est vide : Impossible d'importer la liste des participants ")
|
||||
return False, "la session de formation est incorrecte. Impossible d'importer la liste des participants"
|
||||
return False, " La session de formation est incorrecte. Impossible d'importer la liste des participants"
|
||||
|
||||
|
||||
partner_recid = mycommon.get_parnter_recid_from_token(my_token)
|
||||
if (partner_recid is False):
|
||||
mycommon.myprint(str(inspect.stack()[0][3]) + " - partner_recid KO : Impossible d'importer la liste des participants ")
|
||||
return False, "les information de connexion sont incorrectes. Impossible d'importer la liste des participants"
|
||||
return False, " Les information de connexion sont incorrectes. Impossible d'importer la liste des participants"
|
||||
|
||||
status, saved_file = mycommon.Upload_Save_CSV_File(file, Folder)
|
||||
if (status == False):
|
||||
|
@ -1100,7 +1108,7 @@ def AddStagiairetoClass_mass(file=None, Folder=None, diction=None):
|
|||
if( str(mydata['status']) != "0" and str(mydata['status']) != "1" and str(mydata['status']) != "2"):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Le champs 'status' de ligne " + str(n) + " est incorrecte. Valeurs acceptées : 0,1,2")
|
||||
return False, " Le champs status de ligne " + str(n) + " est incorrecte. Valeurs acceptées : 0,1,2"
|
||||
return False, " Le champs status de la ligne " + str(n) + " est incorrecte. Valeurs acceptées : 0,1,2"
|
||||
|
||||
|
||||
if( str(df['status'].values[n]).strip() == "1"):
|
||||
|
|
4989
Log/log_file.log
4989
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -532,7 +532,7 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
'''
|
||||
field_list = ['date_debut', 'date_fin', 'nb_participant', 'adresse', 'code_postal', 'ville',
|
||||
'session_status', 'date_debut_inscription', 'date_fin_inscription', 'attestation', 'formateur',
|
||||
'code_session', "distantiel", "presentiel", "prix_session"]
|
||||
'code_session', "distanciel", "presentiel", "prix_session"]
|
||||
|
||||
# Controle du nombre de lignes dans le fichier.
|
||||
total_rows = len(df)
|
||||
|
@ -653,11 +653,11 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
local_code_postal = str(df['code_postal'].values[n]).strip()
|
||||
mydata['code_postal'] = local_code_postal
|
||||
|
||||
distantiel = ""
|
||||
if ("distantiel" in df.keys()):
|
||||
if (str(df['distantiel'].values[n])):
|
||||
distantiel = str(df['distantiel'].values[n]).strip()
|
||||
mydata['distantiel'] = distantiel
|
||||
distanciel = ""
|
||||
if ("distanciel" in df.keys()):
|
||||
if (str(df['distanciel'].values[n])):
|
||||
distanciel = str(df['distanciel'].values[n]).strip()
|
||||
mydata['distantiel'] = distanciel
|
||||
|
||||
presentiel = ""
|
||||
if ("presentiel" in df.keys()):
|
||||
|
@ -695,7 +695,7 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
if( str(local_session) != "0" and str(local_session) != "1" and str(local_session) != "2"):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][3]) + " Le champs 'session_status' de ligne " + str(n) + " est incorrecte. Les valeurs acceptées sont 0,1,2")
|
||||
return False, " Le champs nb_participant de ligne " + str(n) + " est incorrecte. Les valeurs acceptées sont 0,1,2"
|
||||
return False, " Le champs 'session_status' de ligne " + str(n) + " est incorrecte. Les valeurs acceptées sont 0,1,2"
|
||||
|
||||
if( str(local_session) == "1"):
|
||||
mydata['session_status'] = str("true")
|
||||
|
@ -733,7 +733,7 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
mydata['date_debut_inscription']) +
|
||||
" est posterieure à la date de fin des inscriptions " + str(mydata['date_fin_inscription']) + " pour la ligne "+str(n)+" ")
|
||||
|
||||
return False, " Impossible de créer la session de formation :La date de fin des inscriptions est antérieure à la date de début des inscriptions pour la ligne "+str(n)+" "
|
||||
return False, " Impossible de créer la session de formation : La date de fin des inscriptions est antérieure à la date de début des inscriptions : Ligne "+str(n)+" "
|
||||
|
||||
mydata['token'] = str(my_token)
|
||||
mydata['class_internal_url'] = str(class_internal_url)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
,index,mots,occurence,moyenne,id_formation,source_field
|
||||
0,0,handicap,1,0.5,TEST_10008_1,title
|
||||
1,1,sensibiliser,1,0.5,TEST_10008_1,title
|
||||
0,0,gestion,1,0.5,CODE_10009,title
|
||||
1,1,stres,1,0.5,CODE_10009,title
|
||||
|
|
|
|
@ -1,3 +1,3 @@
|
|||
mots occurence moyenne id_formation source_field
|
||||
0 handicap 1 0.5 TEST_10008_1 title
|
||||
1 sensibiliser 1 0.5 TEST_10008_1 title
|
||||
mots occurence moyenne id_formation source_field
|
||||
0 gestion 1 0.5 CODE_10009 title
|
||||
1 stres 1 0.5 CODE_10009 title
|
|
@ -256,7 +256,7 @@ def Pre_incription_training_confirmation_mail(diction):
|
|||
"""
|
||||
Verification de la liste des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'adresse', 'title', 'distantiel', 'presentiel']
|
||||
field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'title', 'distantiel', 'presentiel']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
@ -278,12 +278,14 @@ def Pre_incription_training_confirmation_mail(diction):
|
|||
msg['To'] = str(diction['email'])
|
||||
|
||||
|
||||
print(" ### Adresse = "+str(diction['adresse']) )
|
||||
|
||||
# msg = MIMEMultipart("alternative")
|
||||
msg = EmailMessage()
|
||||
smtpserver = smtplib.SMTP(MYSY_GV.O365_SMTP_COUNT_smtpsrv, MYSY_GV.O365_SMTP_COUNT_port)
|
||||
|
||||
local_adress = ""
|
||||
if ("adresse" in diction.keys()):
|
||||
if diction['adresse']:
|
||||
local_adress = diction['adresse']
|
||||
|
||||
# JINJA2
|
||||
templateLoader = jinja2.FileSystemLoader(searchpath="./")
|
||||
|
@ -296,13 +298,12 @@ def Pre_incription_training_confirmation_mail(diction):
|
|||
"prenom": str(diction['prenom']),
|
||||
"date_du": str(diction['date_du']),
|
||||
"date_fin": str(diction['date_au']),
|
||||
"adresse": str(diction['adresse']),
|
||||
"distantiel": str(diction['distantiel']),
|
||||
"presentiel": str(diction['presentiel']),
|
||||
"title": str(diction['title']),
|
||||
"code_postal": str(diction['code_postal']),
|
||||
"ville": str(diction['ville']),
|
||||
|
||||
"adresse":str(local_adress),
|
||||
"email": str(diction['email'])},
|
||||
}
|
||||
|
||||
|
@ -341,8 +342,8 @@ def Notification_partner_Pre_incription_mail(diction):
|
|||
"""
|
||||
Verification de la liste des champs obligatoires
|
||||
"""
|
||||
field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'adresse', 'title',
|
||||
'partner_mail', 'employeur', 'telephone']
|
||||
field_list_obligatoire = ['nom', 'prenom', 'email', 'date_du', 'date_au', 'title',
|
||||
'partner_mail', 'telephone']
|
||||
for val in field_list_obligatoire:
|
||||
if val not in diction:
|
||||
mycommon.myprint(
|
||||
|
@ -351,6 +352,26 @@ def Notification_partner_Pre_incription_mail(diction):
|
|||
|
||||
|
||||
|
||||
local_adress = ""
|
||||
if ("adresse" in diction.keys()):
|
||||
if diction['adresse']:
|
||||
local_adress = diction['adresse']
|
||||
|
||||
local_employeur = ""
|
||||
if ("employeur" in diction.keys()):
|
||||
if diction['employeur']:
|
||||
local_employeur = diction['employeur']
|
||||
|
||||
local_ville = ""
|
||||
if ("ville" in diction.keys()):
|
||||
if diction['ville']:
|
||||
local_ville = diction['ville']
|
||||
|
||||
local_code_postal = ""
|
||||
if ("code_postal" in diction.keys()):
|
||||
if diction['code_postal']:
|
||||
local_code_postal = diction['code_postal']
|
||||
|
||||
tomorrow = datetime.date.today() + datetime.timedelta(days=1)
|
||||
tomorrow_day = tomorrow.strftime("%A")
|
||||
|
||||
|
@ -382,14 +403,14 @@ def Notification_partner_Pre_incription_mail(diction):
|
|||
"prenom": str(diction['prenom']),
|
||||
"date_du": str(diction['date_du']),
|
||||
"date_fin": str(diction['date_au']),
|
||||
"adresse": str(diction['adresse']),
|
||||
"employeur": str(diction['employeur']),
|
||||
"adresse": str(local_adress),
|
||||
"employeur": str(local_employeur),
|
||||
"telephone": str(diction['telephone']),
|
||||
"distantiel": str(diction['distantiel']),
|
||||
"presentiel": str(diction['presentiel']),
|
||||
"title": str(diction['title']),
|
||||
"code_postal": str(diction['code_postal']),
|
||||
"ville": str(diction['ville']),
|
||||
"code_postal": str(local_code_postal),
|
||||
"ville": str(local_ville),
|
||||
"email": str(diction['email'])},
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue