X-Git-Url: https://git.immae.eu/?p=perso%2FDenise%2Foms.git;a=blobdiff_plain;f=app.py;h=49a47a34746ab50d8013a29a4cf03a2ccbcc9283;hp=30afa1cec4127726bac9364f6c5cdc99540e2529;hb=61020126080c00be471ea41a0b25109469d8bda1;hpb=93ba28a72f0df1e113ad12736839b8c6e12de7ae 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":