From 61020126080c00be471ea41a0b25109469d8bda1 Mon Sep 17 00:00:00 2001 From: Denise sur Lya Date: Fri, 19 Jun 2020 17:05:32 +0200 Subject: =?UTF-8?q?am=C3=A9lioration=20du=20code=20encore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index 30afa1c..49a47a3 100644 --- a/app.py +++ b/app.py @@ -55,16 +55,11 @@ def courbe_image(ext): # noter le nom de l'enfant pour l'export nomenfant = simplifie_nom(config['nom']) - #warning(str(config),liste_err) - # créer la figure try: fig = cree_figure(config,l_jours,l_poids,liste_err) - #warning("Jusque là ça va, on a créé la figure",liste_err) result = "success" output = io.BytesIO() - #warning("Là ça va",liste_err) - #warning("Jusque là ça va",liste_err) FigureCanvas(fig).print_png(output) plt.close(fig) @@ -87,7 +82,7 @@ def courbe_image(ext): "export_txt": texte, "nomenfant": nomenfant}) return reponse - #return flask.Response(base64.b64encode(output.getvalue()), mimetype='text/plain') + elif ext == "png" and result == "success": return flask.Response(output.getvalue(), mimetype='image/png') elif ext == "png": -- cgit v1.2.3