From 52d25a9d8b18be181df0b37031812ed7fa492a3b Mon Sep 17 00:00:00 2001 From: pengtao Date: Thu, 31 Oct 2019 17:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E6=97=A5=E6=8A=A5=20grafana-?= =?UTF-8?q?>png=20sendmail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- daily_report/templates/index.html | 4 +--- daily_report/test_report.py | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/daily_report/templates/index.html b/daily_report/templates/index.html index 4b54ab4..2aac656 100644 --- a/daily_report/templates/index.html +++ b/daily_report/templates/index.html @@ -6,9 +6,7 @@

tttt

test Image -test Image -test Image -test Image + 222 \ No newline at end of file diff --git a/daily_report/test_report.py b/daily_report/test_report.py index d858345..87785ba 100644 --- a/daily_report/test_report.py +++ b/daily_report/test_report.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from flask import Flask, render_template, jsonify +from flask import Flask, render_template, jsonify,url_for from flask_mail import Mail, Message import os from threading import Thread @@ -34,7 +34,8 @@ def show_index(): msg = Message(title, sender=sender, recipients=recipients) msg.subject = f"test_游戏日报" - full_filename = os.path.join(app.config['UPLOAD_FOLDER'], 'img2019-10-31.png') + #full_filename = os.path.join(app.config['UPLOAD_FOLDER'], 'img2019-10-31.png') + full_filename = url_for("static",filename= 'images/img2019-10-31.png') print(full_filename) msg.html = render_template('index.html', user_image=full_filename)