游戏日报 grafana->png sendmail

This commit is contained in:
pengtao 2019-10-31 17:03:37 +08:00
parent 2202fd5a7a
commit 52d25a9d8b
2 changed files with 4 additions and 5 deletions

View File

@ -6,9 +6,7 @@
<body>
<h1>tttt</h1>
<img src="{{ user_image }}" alt="test Image">
<img src="/static/images/img2019-10-31.png" alt="test Image">
<img src="../static/images/img2019-10-31.png" alt="test Image">
<img src="11111" alt="test Image">
<img src="https://stackabuse.com/assets/images/logo-dropbox.svg?v=47a80c143d" alt="222">
</body>
</html>

View File

@ -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)