diff options
Diffstat (limited to 'app.py')
-rw-r--r-- | app.py | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -55,16 +55,11 @@ def courbe_image(ext): | |||
55 | # noter le nom de l'enfant pour l'export | 55 | # noter le nom de l'enfant pour l'export |
56 | nomenfant = simplifie_nom(config['nom']) | 56 | nomenfant = simplifie_nom(config['nom']) |
57 | 57 | ||
58 | #warning(str(config),liste_err) | ||
59 | |||
60 | # créer la figure | 58 | # créer la figure |
61 | try: | 59 | try: |
62 | fig = cree_figure(config,l_jours,l_poids,liste_err) | 60 | fig = cree_figure(config,l_jours,l_poids,liste_err) |
63 | #warning("Jusque là ça va, on a créé la figure",liste_err) | ||
64 | result = "success" | 61 | result = "success" |
65 | output = io.BytesIO() | 62 | output = io.BytesIO() |
66 | #warning("Là ça va",liste_err) | ||
67 | #warning("Jusque là ça va",liste_err) | ||
68 | FigureCanvas(fig).print_png(output) | 63 | FigureCanvas(fig).print_png(output) |
69 | 64 | ||
70 | plt.close(fig) | 65 | plt.close(fig) |
@@ -87,7 +82,7 @@ def courbe_image(ext): | |||
87 | "export_txt": texte, | 82 | "export_txt": texte, |
88 | "nomenfant": nomenfant}) | 83 | "nomenfant": nomenfant}) |
89 | return reponse | 84 | return reponse |
90 | #return flask.Response(base64.b64encode(output.getvalue()), mimetype='text/plain') | 85 | |
91 | elif ext == "png" and result == "success": | 86 | elif ext == "png" and result == "success": |
92 | return flask.Response(output.getvalue(), mimetype='image/png') | 87 | return flask.Response(output.getvalue(), mimetype='image/png') |
93 | elif ext == "png": | 88 | elif ext == "png": |