<link rel="stylesheet" href="{{ url_for('static', filename='style/style.css') }}" />
if form1.validate_on_submit:
return redirect(url_for('имя функции которая декорирована @app.route("main.html")'))
from flask_mail import Mail
from flask.ext.mail import Message
mail = Mail(app)
def send_email(subject, sender, recipients, text_body, html_body):
msg = Message(subject, sender=sender, recipients=recipients)
msg.body = text_body
msg.html = html_body
mail.send(msg)
def send_post(email, post):
send_email('This is a new post',
'admin@example.com',
[email],
post,
'<p>' + post + '</p>')
usr = select_allvalid_users()
return jsonify({"user":usr})