23/03/26 - 20h

Signed-off-by: Cherif <cbalde@mysy-training.com>
master_Elyos_FI
Cherif 2026-03-26 20:00:57 +01:00
parent fbc4b2356e
commit 7977b01017
4 changed files with 3585 additions and 6 deletions

View File

@ -5,11 +5,10 @@
</component>
<component name="ChangeListManager">
<list default="true" id="c6d0259a-16e1-410d-91a1-830590ee2a08" name="Changes" comment="26/03/2026 - 12h">
<change afterPath="$PROJECT_DIR$/help_articles.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.py" beforeDir="false" afterPath="$PROJECT_DIR$/Dashbord_queries/ressources_humaines_tbd_qries.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$/ressources_humaines.py" beforeDir="false" afterPath="$PROJECT_DIR$/ressources_humaines.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -453,7 +452,7 @@
<option name="project" value="LOCAL" />
<updated>1747251650255</updated>
</task>
<option name="localTasksCounter" value="555" />
<option name="localTasksCounter" value="556" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">

File diff suppressed because it is too large Load Diff

1615
help_articles.py Normal file

File diff suppressed because it is too large Load Diff

159
main.py
View File

@ -22,6 +22,7 @@ from flask import redirect
from flask import Flask, render_template, request, redirect, url_for
from apscheduler.triggers.cron import CronTrigger
import articles_avis as aa
import help_articles as help_articles
import GlobalVariable as MYSY_GV
import youtubes_analyse as YTA
import test_perso as TP
@ -13408,7 +13409,7 @@ def Add_Update_Email_To_Newsletter():
return jsonify(status=status, message=retval)
"""
API test envoyer sms
API test envoyer sms
"""
@app.route('/myclass/api/send_freemobile_sms/', methods=['POST','GET'])
@crossdomain(origin='*')
@ -13421,7 +13422,6 @@ def send_freemobile_sms():
"""
API test mysy Open AI
"""
@ -17003,6 +17003,161 @@ def Delete_competence_From_domaine_competence_pedagogique():
"""
Cette API pour Recuperation des tous les help articles
"""
@app.route('/myclass/api/get_all_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_all_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_all_help_article payload = ",payload)
status, retval = help_articles.get_all_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API pour Recuperation des help_article publiés
"""
@app.route('/myclass/api/get_all_published_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_all_published_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_all_published_help_article payload = ",payload)
status, retval = help_articles.get_all_published_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API pour Recuperation des help_article non publiés
"""
@app.route('/myclass/api/get_all_non_published_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_all_non_published_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_all_non_published_help_article payload = ",payload)
status, retval = help_articles.get_all_non_published_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API pour Recuperation des 3 derniers help_article
"""
@app.route('/myclass/api/get_last_3_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_last_3_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_last_3_help_article payload = ",payload)
status, retval = help_articles.get_last_3_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API recupere et retourne un help_article
"""
@app.route('/myclass/api/get_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_help_article payload = ",payload)
status, retval = help_articles.get_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API recupere et retourne un help_article en partant de l'_id
"""
@app.route('/myclass/api/get_help_article_from_id/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_help_article_from_id():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_help_article_from_id payload = ",payload)
status, retval = help_articles.get_help_article_from_id(payload)
return jsonify(status=status, message=retval)
"""
Cette API Suppression d'un help_article
"""
@app.route('/myclass/api/delete_help_article_from_id/', methods=['POST','GET'])
@crossdomain(origin='*')
def delete_help_article_from_id():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### delete_help_article_from_id payload = ",payload)
status, retval = help_articles.delete_help_article_from_id(payload)
return jsonify(status=status, message=retval)
"""
Cette API ajouter un help_article
"""
@app.route('/myclass/api/add_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def add_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### add_help_article payload = ",payload)
status, retval = help_articles.add_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API mettre à jour un help_article
"""
@app.route('/myclass/api/update_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def update_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### update_help_article payload = ",payload)
status, retval = help_articles.update_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API recehrche un help_article
"""
@app.route('/myclass/api/recherche_help_article/', methods=['POST','GET'])
@crossdomain(origin='*')
def recherche_help_article():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### recherche_help_article payload = ",payload)
status, retval = help_articles.recherche_help_article(payload)
return jsonify(status=status, message=retval)
"""
Cette API fonction retourne la liste
des help_article à la une
"""
@app.route('/myclass/api/get_help_article_alaune/', methods=['POST','GET'])
@crossdomain(origin='*')
def get_help_article_alaune():
# On recupere le corps (payload) de la requete
payload = mycommon.strip_dictionary (request.form.to_dict())
print(" ### get_help_article_alaune payload = ",payload)
status, retval = help_articles.get_help_article_alaune(payload)
return jsonify(status=status, message=retval)
if __name__ == '__main__':
print(" debut api")