06/11/22 - 22h
parent
cc992b446e
commit
20c85ad917
|
@ -66,7 +66,7 @@ Au dela de 300 caractère, le système rame
|
|||
MAX_CARACT = 300
|
||||
MAX_CARACT_DEDUIT = 150
|
||||
TOKEN_SIZE = 25
|
||||
MAX_CARACT_DETAIL = 500
|
||||
MAX_CARACT_DETAIL = 1000
|
||||
|
||||
|
||||
|
||||
|
@ -205,7 +205,14 @@ SENDINBLUE_API_KEY_SUPPORT = "xkeysib-f307361b68d4b0a7ef03dea586f193e14a3a9f9e30
|
|||
"""
|
||||
Variable SMTP de OFFICE 365, suite a l'abandon de sendinblu comme relay stmp
|
||||
"""
|
||||
O365_SMTP_COUNT_password = 'GomboyaVince1234+'
|
||||
O365_SMTP_COUNT_password = 'Xad47198'
|
||||
O365_SMTP_COUNT_smtpsrv = "smtp.office365.com"
|
||||
O365_SMTP_COUNT_user = "cbalde@mysy-training.com"
|
||||
O365_SMTP_COUNT_user = "support@mysy-training.com"
|
||||
O365_SMTP_COUNT_From_User = "support@mysy-training.com"
|
||||
O365_SMTP_COUNT_port = 587
|
||||
|
||||
#O365_SMTP_COUNT_password = 'GomboyaVince1234+'
|
||||
#O365_SMTP_COUNT_smtpsrv = "smtp.office365.com"
|
||||
#O365_SMTP_COUNT_user = "cbalde@mysy-training.com"
|
||||
#O365_SMTP_COUNT_port = 587
|
||||
|
||||
|
|
8439
Log/log_file.log
8439
Log/log_file.log
File diff suppressed because one or more lines are too long
|
@ -69,7 +69,7 @@
|
|||
<p style="text-align:justify">
|
||||
Vous avez fait une demande de création d'un compte professionnel sur mysy-training.com.</p>
|
||||
|
||||
<p style="text-align:justify">La securité des vos données est primordiale pour nous. Une fois que vous aurez activez votre compte vous allez recevoir <font color="red"> une clé secrète </font> necessaire pour vous connecter.</p>
|
||||
<p style="text-align:justify">La sécurité de vos données est primordiale pour nous. Une fois que vous aurez activé votre compte vous allez recevoir <font color="red"> une clé secrète </font> nécessaire pour vous connecter.</p>
|
||||
|
||||
<p style="text-align:justify">Pour activer votre compte, veuillez cliquer sur le lien ci-dessous. </p>
|
||||
</p>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<p style="text-align:justify; color: red; text-decoration: underline;">Important </p>
|
||||
<p style="text-align:justify">
|
||||
Pour vous connecter entant que professionnel sur le
|
||||
site mysy-training.com, la clé secrete et le mot de passe sont necessaires.</p>
|
||||
site mysy-training.com, la clé secrète et le mot de passe sont nécessaires.</p>
|
||||
|
||||
</p>
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ Vous venez d'activer votre compte professionnel sur le moteur de recherche MySy-
|
|||
|
||||
<p style="text-align:justify">
|
||||
|
||||
Vous pouvez dès à présent vous connecter à l'aide de votre email, mot de passe et votre <font color="red"> clé secrete </font> pour utiliser les services proposés par MySy.</p>
|
||||
Vous pouvez dès à présent vous connecter à l'aide de votre email, mot de passe et votre <font color="red"> clé secrète </font> pour utiliser les services proposés par MySy.</p>
|
||||
|
||||
<p style="text-align:justify">Votre clé secrète est : {{ params.secrete }}<br />url de connexion : https://www.mysy-training.com/PartnerLogin </p>
|
||||
</p>
|
||||
|
|
18
class_mgt.py
18
class_mgt.py
|
@ -46,7 +46,7 @@ def add_class(diction):
|
|||
field_list = ['external_code', 'title', 'description', 'trainer', 'institut_formation', 'distantiel', 'presentiel',
|
||||
'price', 'url','duration', 'duration_unit', 'token', 'plus_produit', 'mots_cle','domaine',
|
||||
'internal_url', 'zone_diffusion', 'metier', 'date_lieu', 'published', 'img_url', 'objectif',
|
||||
'programme', 'prerequis', 'note', 'cpf']
|
||||
'programme', 'prerequis', 'note', 'cpf', 'certif']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -149,6 +149,10 @@ def add_class(diction):
|
|||
if diction['cpf']:
|
||||
mydata['cpf'] = diction['cpf']
|
||||
|
||||
if ("certif" in diction.keys()):
|
||||
if diction['certif']:
|
||||
mydata['certif'] = diction['certif']
|
||||
|
||||
if ("objectif" in diction.keys()):
|
||||
if diction['objectif']:
|
||||
mydata['objectif'] = diction['objectif']
|
||||
|
@ -525,7 +529,8 @@ def update_class(diction):
|
|||
field_list = ['external_code', 'title', 'description', 'trainer', 'institut_formation', 'distantiel',
|
||||
'presentiel','price', 'url', 'duration', 'token','plus_produit', 'mots_cle',
|
||||
'domaine', 'internal_code', 'internal_url','zone_diffusion', 'metier',
|
||||
'date_lieu', 'published', 'img_url', 'objectif', 'programme', 'prerequis', 'note', 'cpf']
|
||||
'date_lieu', 'published', 'img_url', 'objectif', 'programme', 'prerequis', 'note',
|
||||
'cpf', 'certif']
|
||||
|
||||
incom_keys = diction.keys()
|
||||
for val in incom_keys:
|
||||
|
@ -602,6 +607,9 @@ def update_class(diction):
|
|||
if ("cpf" in diction.keys()):
|
||||
mydata['cpf'] = diction['cpf']
|
||||
|
||||
if ("certif" in diction.keys()):
|
||||
mydata['certif'] = diction['certif']
|
||||
|
||||
if ("prerequis" in diction.keys()):
|
||||
mydata['prerequis'] = diction['prerequis']
|
||||
|
||||
|
@ -2218,7 +2226,7 @@ def add_class_mass(file=None, Folder=None, diction=None):
|
|||
field_list = ['external_code', 'titre', 'description', 'formateur', 'institut_formation',
|
||||
'distantiel', 'presentiel', 'prix', 'domaine', 'url','duree', 'plus_produit',
|
||||
'mots_cle', 'zone_diffusion', 'metier', 'date_lieu', 'publie', 'img_url',
|
||||
'objectif', 'programme', 'prerequis', 'formateur', 'note', 'cpf']
|
||||
'objectif', 'programme', 'prerequis', 'formateur', 'note', 'cpf', 'certif']
|
||||
|
||||
total_rows = len(df)
|
||||
|
||||
|
@ -2284,6 +2292,10 @@ def add_class_mass(file=None, Folder=None, diction=None):
|
|||
if (str(df['cpf'].values[n])):
|
||||
mydata['cpf'] = str(df['cpf'].values[n])
|
||||
|
||||
if ("certif" in df.keys()):
|
||||
if (str(df['certif'].values[n])):
|
||||
mydata['certif'] = str(df['certif'].values[n])
|
||||
|
||||
if ("objectif" in df.keys()):
|
||||
if (str(df['objectif'].values[n])):
|
||||
mydata['objectif'] = str(df['objectif'].values[n])
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
,index,mots,occurence,moyenne,id_formation,source_field
|
||||
0,0,financiere,1,0.33,POT_CL20001,title
|
||||
1,1,entreprise,1,0.33,POT_CL20001,title
|
||||
2,2,analyse,1,0.33,POT_CL20001,title
|
||||
0,0,actualite,1,0.5,POT_191206,title
|
||||
1,1,sociale,1,0.5,POT_191206,title
|
||||
|
|
|
|
@ -782,8 +782,8 @@ def CreateInvoice(diction):
|
|||
ret_val = coll_facture.insert_one(diction)
|
||||
|
||||
if ret_val and ret_val.inserted_id:
|
||||
print("str(new_data['invoice_email']) = " + str(diction['invoice_email']))
|
||||
print("str(diction['invoice_id']) = " + str(diction['invoice_id']))
|
||||
#print("str(new_data['invoice_email']) = " + str(diction['invoice_email']))
|
||||
#print("str(diction['invoice_id']) = " + str(diction['invoice_id']))
|
||||
|
||||
# Envoie de l'email de la facture
|
||||
PrintAndSendInvoices(str(diction['invoice_id']))
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
mots occurence moyenne id_formation source_field
|
||||
0 financiere 1 0.33 POT_CL20001 title
|
||||
1 entreprise 1 0.33 POT_CL20001 title
|
||||
2 analyse 1 0.33 POT_CL20001 title
|
||||
mots occurence moyenne id_formation source_field
|
||||
0 actualite 1 0.5 POT_191206 title
|
||||
1 sociale 1 0.5 POT_191206 title
|
18
email_mgt.py
18
email_mgt.py
|
@ -1169,7 +1169,7 @@ def send_user_account_mail(message, account_mail):
|
|||
msg.set_content(sourceHtml, subtype='html')
|
||||
|
||||
msg['Subject'] = '[MySy Training] : Activez votre compte '
|
||||
msg['From'] = 'cbalde@mysy-training.com'
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
msg['To'] = str(account_mail)
|
||||
to = [{"email": str(account_mail)}]
|
||||
bcc = [{"email": "contact@mysy-training.com"}]
|
||||
|
@ -1235,7 +1235,7 @@ def send_partner_account_mail(message, account_mail):
|
|||
|
||||
|
||||
msg['Subject'] = '[MySy Training]: activation de votre compte PRO'
|
||||
msg['From'] = 'cbalde@mysy-training.com'
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
msg['To'] = str(toaddrs)
|
||||
msg['Cc'] = 'contact@mysy-training.com'
|
||||
to = [{"email": str(account_mail)}]
|
||||
|
@ -1304,7 +1304,7 @@ def Pro_Account_Token_Pass(account_mail, my_token):
|
|||
|
||||
msg['Subject'] = '[MySy Training]: votre compte PRO est pret'
|
||||
cle = my_token
|
||||
msg['From'] = 'cbalde@mysy-training.com'
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
msg['To'] = str(toaddrs)
|
||||
msg['Cc'] = 'contact@mysy-training.com'
|
||||
to = [{"email": str(account_mail)}]
|
||||
|
@ -1369,7 +1369,7 @@ def send_user_thks_mail(message, account_mail):
|
|||
|
||||
msg.set_content(sourceHtml, subtype='html')
|
||||
|
||||
msg['From'] = 'cbalde@mysy-training.com'
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
msg['Cc'] = 'contact@mysy-training.com'
|
||||
msg['Subject'] = '[MySy Training]: Votre compte est actif '
|
||||
msg['To'] = str(account_mail)
|
||||
|
@ -1404,12 +1404,6 @@ def send_user_init_pwd_mail(token, account_mail, type_account):
|
|||
elif (MYSY_GV.MYSY_ENV == "DEV"):
|
||||
my_url = "http://localhost:3009/ResetUserPwd/" + str(token)+"/"+str(type_account)
|
||||
|
||||
|
||||
|
||||
|
||||
to = [{"email": str(account_mail)}]
|
||||
bcc = [{"email": "contact@mysy-training.com"}]
|
||||
|
||||
"""send_smtp_email = sib_api_v3_sdk.SendSmtpEmail(template_id=19, params={"mysyurl": my_url,
|
||||
"user_name": str(account_mail),
|
||||
}, to=to, bcc=bcc
|
||||
|
@ -1437,7 +1431,7 @@ def send_user_init_pwd_mail(token, account_mail, type_account):
|
|||
sourceHtml = template.render(params=body["params"])
|
||||
|
||||
msg.set_content(sourceHtml, subtype='html')
|
||||
msg['From'] = 'cbalde@mysy-training.com'
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
msg['Cc'] = 'contact@mysy-training.com'
|
||||
msg['Subject'] = '[MySy Training Technology] : Reinitialisez votre mot de passe'
|
||||
msg['To'] = str(account_mail)
|
||||
|
@ -1496,7 +1490,7 @@ def EmailDemandeInfoClass( diction):
|
|||
sourceHtml = template.render(params=body["params"])
|
||||
|
||||
msg.set_content(sourceHtml, subtype='html')
|
||||
msg['From'] = 'cbalde@mysy-training.com'
|
||||
msg['From'] = MYSY_GV.O365_SMTP_COUNT_From_User
|
||||
msg['Cc'] = 'contact@mysy-training.com'
|
||||
msg['Subject'] = "[MySy Training Technology] : Demande d'information"
|
||||
msg['To'] = 'contact@mysy-training.com'
|
||||
|
|
12
wrapper.py
12
wrapper.py
|
@ -119,8 +119,6 @@ def update_class_by_attribut(objId, attribut, value):
|
|||
mycommon.myprint(str(inspect.stack()[0][3]) + " -" + str(e) + " - ERRORRRR AT Line : " + str(exc_tb.tb_lineno))
|
||||
return False
|
||||
|
||||
|
||||
import random
|
||||
def get_all_class(diction):
|
||||
try:
|
||||
|
||||
|
@ -348,17 +346,21 @@ def get_training_in_user_zone(diction):
|
|||
sort(
|
||||
[ ("display_rank", pymongo.DESCENDING), ("price", pymongo.ASCENDING), ("date_update", pymongo.DESCENDING),]):
|
||||
|
||||
#print("AVANT AVANN ==> ")
|
||||
val_not_cleaned = x['description']
|
||||
CLEANR = re.compile('<.*?>')
|
||||
|
||||
val = re.sub(CLEANR, '', str(val_not_cleaned))
|
||||
val = str(val).replace(" ", " ").replace('\n','')
|
||||
#print("AVANT 2 ==> " + str(x['description']) + " taille = " + str(len(x['description'])))
|
||||
|
||||
#print("AVANT 2 ==> "+str(x['description'])+" taille = "+str( len(x['description']) ))
|
||||
val = x['description']
|
||||
if( len(x['description']) > MYSY_GV.MAX_CARACT ):
|
||||
x['description'] = val[:MYSY_GV.MAX_CARACT]+" ..."
|
||||
|
||||
else:
|
||||
x['description'] = val[:MYSY_GV.MAX_CARACT]
|
||||
|
||||
#mycommon.myprint("APRES ==> " + str(x['description']))
|
||||
#print("APRES 2 ==> " + str(x['description']))
|
||||
|
||||
user = x
|
||||
user['id'] = str(val_tmp)
|
||||
|
|
Loading…
Reference in New Issue