19/01/23 - 20h
parent
8bd9c66bdb
commit
9c1a0609d5
|
@ -3,13 +3,13 @@
|
|||
<component name="ChangeListManager">
|
||||
<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$/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$/Template/MySy_confirmation_inscription_formation_tpl.html" beforeDir="false" afterPath="$PROJECT_DIR$/Template/MySy_confirmation_inscription_formation_tpl.html" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/email_inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/email_inscription_mgt.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
|
@ -412,7 +412,8 @@ def UpdateStagiairetoClass(diction):
|
|||
local_distance = ""
|
||||
if ("distantiel" in local_tmp_session.keys() and local_tmp_session['distantiel']):
|
||||
local_distance = local_tmp_session['distantiel']
|
||||
email_data['adresse'] = local_distance
|
||||
email_data['distantiel'] = local_distance
|
||||
|
||||
|
||||
local_presence = ""
|
||||
if ("presentiel" in local_tmp_session.keys() and local_tmp_session['presentiel']):
|
||||
|
@ -425,7 +426,6 @@ def UpdateStagiairetoClass(diction):
|
|||
email_data['formateur'] = local_formateur
|
||||
|
||||
|
||||
|
||||
if ( diction['status'] == "1" ):
|
||||
# Il s'agit d'envoyer le message de confirmation d'une inscription
|
||||
local_status, local_message = email_session.incription_training_confirmation_mail(email_data)
|
||||
|
@ -709,7 +709,11 @@ def SendPre_InscriptionEmail(diction):
|
|||
if local_info_session[0]['ville']:
|
||||
data_mail['ville'] = local_info_session[0]['ville']
|
||||
|
||||
if ("adresse" in local_info_session[0].keys()):
|
||||
if local_info_session[0]['adresse']:
|
||||
data_mail['adresse'] = local_info_session[0]['adresse']
|
||||
|
||||
#print(" Pre_incription_training_confirmation_mail DATA = ",data_mail )
|
||||
|
||||
# Envoi de l'email de confirmation au demandeur de la formation
|
||||
local_status, local_message = email_session.Pre_incription_training_confirmation_mail(data_mail)
|
||||
|
|
1000
Log/log_file.log
1000
Log/log_file.log
File diff suppressed because it is too large
Load Diff
|
@ -211,10 +211,10 @@ def Add_Update_SessionFormation(diction):
|
|||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer/mettre à jour la session de formation : La date debut " + str(
|
||||
diction['date_debut']) +
|
||||
" est posterieure à la date de fin " + str(diction['date_fin']) )
|
||||
" est postérieur à la date de fin " + str(diction['date_fin']) )
|
||||
|
||||
return False, " Impossible de créer la session de formation : La date debut " + str(diction['date_debut']) + \
|
||||
" est posterieure à la date de fin " + str(diction['date_fin']) + " "
|
||||
" est postérieur à la date de fin " + str(diction['date_fin']) + " "
|
||||
|
||||
|
||||
if (datetime.strptime(str(diction['date_debut_inscription'])[0:10], '%d/%m/%Y') > datetime.strptime(
|
||||
|
@ -223,12 +223,12 @@ def Add_Update_SessionFormation(diction):
|
|||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer/mettre à jour la session de formation : La date date_debut_inscription " + str(
|
||||
diction['date_debut_inscription']) +
|
||||
" est posterieure à la date de date_fin_inscription " + str(diction['date_fin_inscription']) )
|
||||
" est postérieur à la date de date_fin_inscription " + str(diction['date_fin_inscription']) )
|
||||
|
||||
return False, " Impossible de créer /mettre à jour la session de formation : La date_debut_inscription " + str(diction['date_debut_inscription']) + \
|
||||
" est posterieure à la date_fin_inscription " + str(diction['date_fin_inscription']) + " "
|
||||
|
||||
" est postérieur à la date_fin_inscription " + str(diction['date_fin_inscription']) + " "
|
||||
|
||||
"""
|
||||
mytoday = datetime.today().strftime("%d/%m/%Y")
|
||||
if (datetime.strptime(str(diction['date_debut'])[0:10], '%d/%m/%Y') < datetime.strptime(str(mytoday).strip(), '%d/%m/%Y')) :
|
||||
mycommon.myprint(
|
||||
|
@ -239,7 +239,7 @@ def Add_Update_SessionFormation(diction):
|
|||
return False, " - Impossible de créer/mettre à jour la session de formation : La date de debut de sessions " + str(
|
||||
diction['date_debut']) +" est antérieure à la date du jour "
|
||||
|
||||
|
||||
"""
|
||||
# Fin Controle de cohérence sur les dates
|
||||
|
||||
|
||||
|
@ -601,10 +601,10 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer la session de formation : La date debut " + str(mydata['date_debut']) +
|
||||
" est posterieure à la date de fin " + str(mydata['date_fin']) + " pour la ligne "+str(n)+" ")
|
||||
" est postérieur à la date de fin " + str(mydata['date_fin']) + " pour la ligne "+str(n)+" ")
|
||||
|
||||
return False, " Impossible de créer la session de formation : La date debut " + str(mydata['date_debut']) +\
|
||||
" est posterieure à la date de fin " + str(mydata['date_fin']) + " pour la ligne "+str(n)+" "
|
||||
" est postérieur à la date de fin " + str(mydata['date_fin']) + " pour la ligne "+str(n)+" "
|
||||
|
||||
|
||||
local_nb_participants = "0"
|
||||
|
@ -731,7 +731,7 @@ def Add_Update_SessionFormation_mass(file=None, Folder=None, diction=None):
|
|||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer la session de formation : La date debut des inscriptions " + str(
|
||||
mydata['date_debut_inscription']) +
|
||||
" est posterieure à la date de fin des inscriptions " + str(mydata['date_fin_inscription']) + " pour la ligne "+str(n)+" ")
|
||||
" est postérieur à 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 : Ligne "+str(n)+" "
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<tr>
|
||||
<td bgcolor="#ffffff" height="165" style="height:165px; padding: 0.7rem;" width="600">
|
||||
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff"
|
||||
style="background-color:#ffffff">
|
||||
style="background-color:#ffffff">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" height="165"
|
||||
|
@ -89,9 +89,19 @@
|
|||
inscription à la session de formation :
|
||||
<font color="green" weight="bold"> {{params.title}}
|
||||
</font> qui se tiendra
|
||||
<font color="green" weight="bold">du
|
||||
{{params.date_du}} au {{params.date_fin}}.
|
||||
</font>
|
||||
{% if params.date_du == params.date_fin %}
|
||||
<font color="green" weight="bold"> le
|
||||
{{params.date_du}}
|
||||
</font> .
|
||||
{% endif %}
|
||||
|
||||
{% if params.date_du != params.date_fin %}
|
||||
<font color="green" weight="bold"> du
|
||||
{{params.date_du}} au {{params.date_fin}}
|
||||
</font> .
|
||||
{% endif %}
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
|
@ -110,11 +120,19 @@
|
|||
|
||||
{% if params.distantiel == "1" %}
|
||||
<p style="text-align:justify">
|
||||
Il s'agit d'une formation en ligne.
|
||||
Il s'agit d'une formation en ligne. Les details vous
|
||||
seront communiqués ultérieurement.
|
||||
</p>
|
||||
{% else %}
|
||||
<p style="text-align:justify">
|
||||
Cette formation organisée se tiendra au {{ params.adresse }}, {{ params.ville }}, {{ params.code_postal }}.
|
||||
{% elif params.presentiel == "1" %}
|
||||
<p style="text-align:justify">
|
||||
|
||||
{% if params.adresse is defined and params.adresse|length > 1 %}
|
||||
Cette formation se tiendra au {{
|
||||
params.adresse }}, {{ params.ville }}, {{
|
||||
params.code_postal }}.
|
||||
{% else %}
|
||||
Le lieu de la formation vous sera communiqué ultérieurement.
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
|
@ -183,7 +201,7 @@
|
|||
Training 1 Cr du Havre, 75008 Paris ou par mail :
|
||||
contact@mysy-training.com.
|
||||
<br />
|
||||
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
16
class_mgt.py
16
class_mgt.py
|
@ -396,9 +396,9 @@ def add_class(diction):
|
|||
str(tab_date_lieu[1]).strip(), '%d/%m/%Y')):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - la date debut est posterieure à la date de fin pour la formation : " + str(
|
||||
3]) + " - la date debut est postérieur à la date de fin pour la formation : " + str(
|
||||
diction['external_code']) + " ")
|
||||
return False, " La date debut est posterieure à la date de fin pour la formation : " + str(
|
||||
return False, " La date debut est postérieur à la date de fin pour la formation : " + str(
|
||||
diction['external_code']) + " "
|
||||
|
||||
mytoday = datetime.today().strftime("%d/%m/%Y")
|
||||
|
@ -406,9 +406,9 @@ def add_class(diction):
|
|||
'%d/%m/%Y')):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - la date debut est posterieure à la date du jour pour la formation : " + str(
|
||||
3]) + " - la date debut est postérieur à la date du jour pour la formation : " + str(
|
||||
diction['external_code']) + " ")
|
||||
return False, " La date debut est posterieure à la date du jour pour la formation : " + str(
|
||||
return False, " La date debut est postérieur à la date du jour pour la formation : " + str(
|
||||
diction['external_code']) + " "
|
||||
|
||||
# On créé un identifiant unique par session
|
||||
|
@ -833,18 +833,18 @@ def update_class(diction):
|
|||
if (datetime.strptime(str(tab_date_lieu[0]).strip(), '%d/%m/%Y') > datetime.strptime(str(tab_date_lieu[1]).strip(), '%d/%m/%Y')):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - la date debut est posterieure à la date de fin pour la formation : " + str(
|
||||
3]) + " - la date debut est postérieur à la date de fin pour la formation : " + str(
|
||||
diction['external_code']) + " ")
|
||||
return False, " La date debut est posterieure à la date de fin pour la formation : " + str(
|
||||
return False, " La date debut est postérieur à la date de fin pour la formation : " + str(
|
||||
diction['external_code']) + " "
|
||||
|
||||
mytoday = datetime.today().strftime("%d/%m/%Y")
|
||||
if (datetime.strptime(str(tab_date_lieu[0]), '%d/%m/%Y') < datetime.strptime(str(mytoday), '%d/%m/%Y')):
|
||||
mycommon.myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - la date debut est posterieure à la date du jour pour la formation : " + str(
|
||||
3]) + " - la date debut est postérieur à la date du jour pour la formation : " + str(
|
||||
diction['external_code']) + " ")
|
||||
return False, " La date debut est posterieure à la date du jour pour la formation : " + str(
|
||||
return False, " La date debut est postérieur à la date du jour pour la formation : " + str(
|
||||
diction['external_code']) + " "
|
||||
|
||||
"""
|
||||
|
|
|
@ -91,6 +91,32 @@ def incription_training_confirmation_mail(diction):
|
|||
smtpserver = smtplib.SMTP(MYSY_GV.O365_SMTP_COUNT_smtpsrv, MYSY_GV.O365_SMTP_COUNT_port)
|
||||
msg = EmailMessage()
|
||||
|
||||
local_code_postal = ""
|
||||
if ("code_postal" in diction.keys()):
|
||||
if diction['code_postal']:
|
||||
local_code_postal = diction['code_postal']
|
||||
|
||||
local_ville = ""
|
||||
if ("ville" in diction.keys()):
|
||||
if diction['ville']:
|
||||
local_ville = diction['ville']
|
||||
|
||||
local_distantiel = ""
|
||||
if ("distantiel" in diction.keys()):
|
||||
if diction['distantiel']:
|
||||
local_distantiel = diction['distantiel']
|
||||
|
||||
local_presentiel = ""
|
||||
if ("presentiel" in diction.keys()):
|
||||
if diction['presentiel']:
|
||||
local_presentiel = diction['presentiel']
|
||||
|
||||
local_formateur = ""
|
||||
if ("formateur" in diction.keys()):
|
||||
if diction['formateur']:
|
||||
local_formateur = diction['formateur']
|
||||
|
||||
|
||||
# JINJA2
|
||||
templateLoader = jinja2.FileSystemLoader(searchpath="./")
|
||||
templateEnv = jinja2.Environment(loader=templateLoader)
|
||||
|
@ -106,11 +132,11 @@ def incription_training_confirmation_mail(diction):
|
|||
"adresse": str(adresse_session),
|
||||
"title": str(diction['title']),
|
||||
|
||||
"code_postal": str(diction['code_postal']),
|
||||
"ville": str(diction['ville']),
|
||||
"distantiel": str(diction['distantiel']),
|
||||
"presentiel": str(diction['presentiel']),
|
||||
"formateur": str(diction['formateur']),
|
||||
"code_postal": str(local_code_postal),
|
||||
"ville": str(local_ville),
|
||||
"distantiel": str(local_distantiel),
|
||||
"presentiel": str(local_presentiel),
|
||||
"formateur": str(local_formateur),
|
||||
|
||||
|
||||
"email": str(diction['email'])},
|
||||
|
|
|
@ -2456,9 +2456,9 @@ def CreateTrainingSession_id(diction):
|
|||
if (datetime.strptime(str(diction['date_du']).strip(), '%d/%m/%Y') > datetime.strptime(str(diction['date_au']).strip(), '%d/%m/%Y')):
|
||||
myprint(
|
||||
str(inspect.stack()[0][
|
||||
3]) + " - Impossible de créer la session de formation : La date debut "+str(diction['date_du'])+" est posterieure à la date de fin "+str(diction['date_au'])+" pour la formation ")
|
||||
3]) + " - Impossible de créer la session de formation : La date debut "+str(diction['date_du'])+" est postérieur à la date de fin "+str(diction['date_au'])+" pour la formation ")
|
||||
|
||||
return False, " Impossible de créer la session de formation : La date debut "+str(diction['date_du'])+" est posterieure à la date de fin "+str(diction['date_au'])+" pour la formation "
|
||||
return False, " Impossible de créer la session de formation : La date debut "+str(diction['date_du'])+" est postérieur à la date de fin "+str(diction['date_au'])+" pour la formation "
|
||||
|
||||
session_id = str(
|
||||
str(diction['date_du']).strip() +
|
||||
|
|
Loading…
Reference in New Issue